'use strict';
game.import('card', function (lib, game, ui, get, ai, _status) {
	return {
		name: 'standard',
		connect: true,
		cardSort: {
			standard: {
				basic: ["sha", "shan", "jiu", "tao", "du"],
				trick: ["caiming", "chenghuodajie", "guaguliaodu", "shushangkaihua", "huizhe", "huogong", "jiedao", "juedou", "manzu", "menghun", "guohe", "mingan", "nanman", "shebei", "shunshou", "taoyuan", "tiesuo", "tufa", "tuixinzhifu", "wanjian", "wudou", "wugu", "wuxie", "bingliang", "lebu", "shandian", "shuimu", "tuqiong", "pengran"],
				equip1: ["Ashanzi", "Ashoubing", "Atiegun", "cixiong", "duanjian", "guanshi", "guding", "qixingbaodao", "yitianjian", "zhangba", "zhuque", "zhuge"],
				equip2: ["Abinggan", "Ahuasan", "bagua", "tengjia", "serafuku", "yinfengyi", "baiyin", "Ajiutong"],
				equip3: ["Ayangtuo", "dilu", "hualiu", "zhanxiang", "zhuahuang"],
				equip4: ["Amanniu", "yonglv", "chitu", "dawan"],
				equip5: ["Azhijiangstar", "muniu", "xinge"],
				delay: ["sha_delay", "jiu_delay", "tao_delay", "guagu_delay", "caiming_delay", "huogong_delay", "manzu_delay", "guohe_delay", "shunshou_delay", 'pengran_delay'],
			},
		},
		card: {
			damage: {
				ai: {
					result: {
						target: -1.5
					},
					tag: {
						damage: 1
					}
				}
			},
			recover: {
				ai: {
					result: {
						target: 1.5
					},
					tag: {
						recover: 1
					}
				}
			},
			firedamage: {
				ai: {
					result: {
						target: -1.5
					},
					tag: {
						damage: 1,
						fireDamage: 1,
						natureDamage: 1,
					}
				}
			},
			thunderdamage: {
				ai: {
					result: {
						target: -1.5
					},
					tag: {
						damage: 1,
						thunderDamage: 1,
						natureDamage: 1,
					}
				}
			},
			icedamage: {
				ai: {
					result: {
						target: -1.5
					},
					tag: {
						damage: 1,
						iceDamage: 1,
						natureDamage: 1,
					}
				}
			},
			respondShan: {
				ai: {
					result: {
						target: -1.5,
					},
					tag: {
						respond: 1,
						respondShan: 1,
						damage: 1
					}
				}
			},
			sha: {
				audio: true,
				fullskin: true,
				nature: ['thunder', 'fire', 'kami', 'ice'],
				type: 'basic',
				enable: true,
				usable: 1,
				updateUsable: 'phaseUse',
				global: ['xiayu_delay_skill', 'zhifang_delay_skill', 'fengqing_delay_skill', 'luanchuang_delay_skill'],
				range: { attack: 1 },
				selectTarget: 1,
				cardPrompt: function (card) {
					if (card.nature == 'stab') return '出牌阶段，对你攻击范围内的一名角色使用。其须使用一张【闪】，且在此之后需弃置一张手牌（没有则不弃）。否则你对其造成1点伤害。';
					if (lib.linked.contains(card.nature)) return '出牌阶段，对你攻击范围内的一名角色使用。其须使用一张【闪】，否则你对其造成1点' + get.translation(card.nature) + '属性伤害。';
					return '出牌阶段，对你攻击范围内的一名角色使用。其须使用一张【闪】，否则你对其造成1点伤害。';
				},
				delay_prompt: function (card) {
					var str = '';
					str += '出牌阶段对其他角色使用，将该牌置入其判定区内。若判定结果与该牌花色不同，你对目标使用此【杀】并发动额外效果。<br>';
					if (get.cardtag(card, 'delay_jiabu')) {
						str += '<span style="color:#E799B0">嘉步：此【杀】不可用红桃闪响应。</span>';
					}
					if (get.cardtag(card, 'delay_zhifang')) {
						str += '<span style="color:#576690">纸防：此【杀】无视防具。</span>';
					}
					if (get.cardtag(card, 'delay_xiayu')) {
						str += '<span style="color:#9AC8E2">下雨：当此【杀】造成伤害时，若其有牌，你可防止此伤害，依次弃置其两张牌。</span>';
					}
					if (get.cardtag(card, 'delay_fengqing')) {
						str += '<span style="color:#B8A6D9">风情：当此【杀】造成伤害时，你可改为无属性伤害，然后横置或重置目标角色。</span>';
					}
					if (get.cardtag(card, 'delay_luanchuang')) {
						str += '<span style="color:#DB7D74">乱创：当此【杀】造成伤害后目标角色进入濒死状态，其他角色不可使用【桃】。</span>';
					}
					return str;
				},
				yingbian_prompt: function (card) {
					var str = '';
					if (get.cardtag(card, 'yingbian_hit')) {
						str += '此牌不可被响应';
					}
					if (get.cardtag(card, 'yingbian_damage')) {
						if (str.length) str += '；';
						str += '此牌的伤害值基数+1';
					}
					if (!str.length || get.cardtag(card, 'yingbian_add')) {
						if (str.length) str += '；';
						str += '当你使用此牌选择目标后，你可为此牌增加一个目标';
					}
					return str;
				},
				yingbian: function (event) {
					var card = event.card, bool = false;
					if (get.cardtag(card, 'yingbian_hit')) {
						bool = true;
						event.directHit.addArray(game.players);
						game.log(card, '不可被响应');
					}
					if (get.cardtag(card, 'yingbian_damage')) {
						bool = true;
						if (typeof event.baseDamage != 'number') event.baseDamage = 1;
						event.baseDamage++;
						game.log(event.card, '的伤害值基数+1');
					}
					if (!bool || get.cardtag(card, 'yingbian_add')) {
						event.yingbian_addTarget = true;
					}
				},
				yingbian_tags: ['hit', 'damage', 'add'],
				filterTarget: function (card, player, target) { return player != target },
				content: function () {
					"step 0"
					if (typeof event.shanRequired != 'number' || !event.shanRequired || event.shanRequired < 0) {
						event.shanRequired = 1;
					}
					if (typeof event.baseDamage != 'number') event.baseDamage = 1;
					if (typeof event.extraDamage != 'number') event.extraDamage = 0;
					event.delay = event.player.storage._shaeffect_delay;
					if (event.delay == 'delay_jiabu')
						delete event.player.storage._shaeffect_delay;
					"step 1"
					if (event.directHit || event.directHit2 || (!_status.connectMode && lib.config.skip_shan && !target.hasShan())) {
						event._result = { bool: false };
					}
					else if (event.skipShan) {
						event._result = { bool: true, result: 'shaned' };
					}
					else {
						if (event.delay == 'delay_jiabu') game.log('#b' + get.translation(player.name), '发动了嘉步');
						var next = target.chooseToUse('请使用一张闪响应杀');
						next.set('type', 'respondShan');
						next.set('filterCard', function (card, player) {
							if (get.name(card) != 'shan') return false;
							if (event.delay == 'delay_jiabu' && get.suit(card) == 'heart') {
								return false;
							}
							return lib.filter.cardEnabled(card, player, 'forceEnable');
						});
						if (event.shanRequired > 1) {
							next.set('prompt2', '（共需使用' + event.shanRequired + '张闪）');
						}
						else if (event.card.nature == 'stab') {
							next.set('prompt2', '（在此之后仍需弃置一张手牌）');
						}
						next.set('ai1', function (card) {
							var target = _status.event.player;
							var evt = _status.event.getParent();
							var bool = true;
							if (_status.event.shanRequired > 1 && !get.is.object(card) && target.countCards('h', 'shan') < _status.event.shanRequired) {
								bool = false;
							}
							else if (target.hasSkillTag('useShan')) {
								bool = true;
							}
							else if (target.hasSkillTag('noShan')) {
								bool = false;
							}
							else if (get.damageEffect(target, evt.player, target, evt.card.nature) >= 0) bool = false;
							if (bool) {
								return get.order(card);
							}
							return 0;
						}).set('shanRequired', event.shanRequired);
						next.set('respondTo', [player, card]);
						//next.autochoose=lib.filter.autoRespondShan;
					}
					"step 2"
					if (!result || !result.bool || !result.result || result.result != 'shaned') {
						event.trigger('shaHit');
					}
					else {
						event.shanRequired--;
						if (event.shanRequired > 0) {
							event.goto(1);
						}
						else if (event.card.nature == 'stab' && target.countCards('h') > 0) {
							event.responded = result;
							event.goto(4);
						}
						else {
							event.trigger('shaMiss');
							event.responded = result;
						}
					}
					"step 3"
					if ((!result || !result.bool || !result.result || result.result != 'shaned') && !event.unhurt) {
						target.damage(get.nature(event.card), event.baseDamage + event.extraDamage);
						event.result = { bool: true }
						event.trigger('shaDamage');
					}
					else {
						event.result = { bool: false }
						event.trigger('shaUnhirt');
					}
					event.finish();
					"step 4"
					target.chooseToDiscard('he', '刺杀：请弃置一张牌，否则此【杀】依然造成伤害').set('ai', function (card) {
						var target = _status.event.player;
						var evt = _status.event.getParent();
						var bool = true;
						if (get.damageEffect(target, evt.player, target, evt.card.nature) >= 0) bool = false;
						if (bool) {
							return 8 - get.useful(card);
						}
						return 0;
					});
					"step 5"
					if ((!result || !result.bool) && !event.unhurt) {
						target.damage(get.nature(event.card), event.baseDamage + event.extraDamage);
						event.result = { bool: true }
						event.trigger('shaDamage');
						event.finish();
					}
					else {
						event.trigger('shaMiss');
					}
					"step 6"
					if ((!result || !result.bool) && !event.unhurt) {
						target.damage(get.nature(event.card), event.baseDamage + event.extraDamage);
						event.result = { bool: true }
						event.trigger('shaDamage');
						event.finish();
					}
					else {
						event.result = { bool: false }
						event.trigger('shaUnhirt');
					}
				},
				ai: {
					yingbian: function (card, player, targets, viewer) {
						if (get.attitude(viewer, player) <= 0) return 0;
						var base = 0, hit = false;
						if (get.cardtag(card, 'yingbian_hit')) {
							hit = true;
							if (targets.filter(function (target) {
								return target.hasShan() && get.attitude(viewer, target) < 0 && get.damageEffect(target, player, viewer, get.nature(card)) > 0;
							})) base += 5;
						}
						if (get.cardtag(card, 'yingbian_all')) {
							if (game.hasPlayer(function (current) {
								return !targets.contains(current) && lib.filter.targetEnabled2(card, player, current) && get.effect(current, card, player, player) > 0;
							})) base += 5;
						}
						if (get.cardtag(card, 'yingbian_damage')) {
							if (targets.filter(function (target) {
								return get.attitude(player, target) < 0 && (hit || !target.mayHaveShan() || player.hasSkillTag('directHit_ai', true, {
									target: target,
									card: card,
								}, true)) && !target.hasSkillTag('filterDamage', null, {
									player: player,
									card: card,
									jiu: true,
								})
							})) base += 5;
						}
						return base;
					},
					canLink: function (player, target, card) {
						if (!target.isLinked() && !player.hasSkill('wutiesuolian_skill')) return false;
						if (target.mayHaveShan() && !player.hasSkillTag('directHit_ai', true, {
							target: target,
							card: card,
						}, true)) return false;
						if (player.hasSkill('jueqing') || player.hasSkill('gangzhi') || target.hasSkill('gangzhi')) return false;
						return true;
					},
					basic: {
						useful: [5, 3, 1],
						value: [5, 3, 1],
					},
					order: function (item, player) {
						if (player.hasSkillTag('presha', true, null, true)) return 10;
						if (lib.linked.contains(get.nature(item))) {
							if (game.hasPlayer(function (current) {
								return current != player && current.isLinked() && player.canUse(item, current, null, true) && get.effect(current, item, player, player) > 0 && lib.card.sha.ai.canLink(player, current, item);
							}) && game.countPlayer(function (current) {
								return current.isLinked() && get.damageEffect(current, player, player, get.nature(item)) > 0;
							}) > 1) return 3.1;
							return 3;
						}
						return 3.05;
					},
					result: {
						target: function (player, target, card, isLink) {
							var eff = function () {
								if (!isLink && player.hasSkill('jiu')) {
									if (!target.hasSkillTag('filterDamage', null, {
										player: player,
										card: card,
										jiu: true,
									})) {
										if (get.attitude(player, target) > 0) {
											return -7;
										}
										else {
											return -4;
										}
									}
									return -0.5;
								}
								return -1.5;
							}();
							if (!isLink && target.mayHaveShan() && !player.hasSkillTag('directHit_ai', true, {
								target: target,
								card: card,
							}, true)) return eff / 1.2;
							return eff;
						},
					},
					tag: {
						respond: 1,
						respondShan: 1,
						damage: function (card) {
							if (card.nature == 'poison') return;
							return 1;
						},
						natureDamage: function (card) {
							if (card.nature) return 1;
						},
						fireDamage: function (card, nature) {
							if (card.nature == 'fire') return 1;
						},
						thunderDamage: function (card, nature) {
							if (card.nature == 'thunder') return 1;
						},
						poisonDamage: function (card, nature) {
							if (card.nature == 'poison') return 1;
						}
					}
				}
			},
			shacopy: {
				ai: {
					basic: {
						useful: [5, 3, 1],
						value: [5, 3, 1],
					},
					order: 3,
					result: {
						target: -1.5,
					},
					tag: {
						respond: 1,
						respondShan: 1,
						damage: function (card) {
							if (card.nature == 'poison') return;
							return 1;
						},
						natureDamage: function (card) {
							if (card.nature) return 1;
						},
						fireDamage: function (card, nature) {
							if (card.nature == 'fire') return 1;
						},
						thunderDamage: function (card, nature) {
							if (card.nature == 'thunder') return 1;
						},
						poisonDamage: function (card, nature) {
							if (card.nature == 'poison') return 1;
						}
					}
				}
			},
			shan: {
				audio: true,
				fullskin: true,
				type: 'basic',
				cardcolor: 'red',
				notarget: true,
				nodelay: true,
				yingbian_prompt: function (card) {
					var str = '';
					if (get.cardtag(card, 'yingbian_gain')) {
						str += '当你声明使用此牌时，你获得此牌响应的目标牌';
					}
					if (!str.length || get.cardtag(card, 'yingbian_draw')) {
						if (str.length) str += '；';
						str += '当你声明使用此牌时，你摸一张牌';
					}
					return str;
				},
				yingbian_tags: ['gain', 'draw'],
				yingbian: function (event) {
					var bool = false;
					if (get.cardtag(event.card, 'yingbian_damage')) {
						bool = true;
						var cardx = event.respondTo;
						if (cardx && cardx[1] && cardx[1].cards && cardx[1].cards.filterInD('od').length) player.gain(cardx[1].cards.filterInD('od'), 'gain2', 'log');
					}
					if (!bool || get.cardtag(event.card, 'yingbian_draw')) event.player.draw();
				},
				content: function () {
					event.result = 'shaned';
					event.getParent().delayx = false;
					game.delay(0.5);
				},
				ai: {
					order: 3,
					basic: {
						useful: [7, 5.1, 2],
						value: [7, 5.1, 2],
					},
					result: { player: 1 },
					//expose:0.2
				}
			},
			tao: {
				fullskin: true,
				type: 'basic',
				nature: ['star'],
				cardcolor: 'red',
				toself: true,
				delay_prompt: '出牌阶段对一名角色使用，将该牌置入其判定区内。其处于濒死状态或在判定阶段受伤时，任何判定结果均生效，其回复1点体力。若判定结果为红色，其摸一张牌。',
				enable: function (card, player) {
					return player.hp < player.maxHp;
				},
				savable: true,
				selectTarget: -1,
				filterTarget: function (card, player, target) {
					return target == player && target.hp < target.maxHp;
				},
				modTarget: function (card, player, target) {
					return target.hp < target.maxHp;
				},
				content: function () {
					target.recover(event.baseDamage || 1, get.nature(event.card));
				},
				ai: {
					basic: {
						order: function (card, player) {
							if (player.hasSkillTag('pretao')) return 5;
							return 2;
						},
						useful: [6.5, 4, 3, 2],
						value: [6.5, 4, 3, 2],
					},
					canLink: function (player, target, card) {
						if (!target.isLinked() && !player.hasSkill('wutiesuolian_skill')) return false;
						return true;
					},
					result: {
						target: 2,
						target_use: function (player, target) {
							// if(player==target&&player.hp<=0) return 2;
							if (player.hasSkillTag('nokeep', true, null, true)) return 2;
							var nd = player.needsToDiscard();
							var keep = false;
							if (nd <= 0) {
								keep = true;
							}
							else if (nd == 1 && target.hp >= 2 && target.countCards('h', 'tao') <= 1) {
								keep = true;
							}
							var mode = get.mode();
							if (target.hp >= 2 && keep && target.hasFriend()) {
								if (target.hp > 2 || nd == 0) return 0;
								if (target.hp == 2) {
									if (game.hasPlayer(function (current) {
										if (target != current && get.attitude(target, current) >= 3) {
											if (current.hp <= 1) return true;
											if ((mode == 'identity' || mode == 'versus' || mode == 'chess') && current.identity == 'zhu' && current.hp <= 2) return true;
										}
									})) {
										return 0;
									}
								}
							}
							if (target.hp < 0 && target != player && target.identity != 'zhu') return 0;
							var att = get.attitude(player, target);
							if (att < 3 && att >= 0 && player != target) return 0;
							var tri = _status.event.getTrigger();
							if (mode == 'identity' && player.identity == 'fan' && target.identity == 'fan') {
								if (tri && tri.name == 'dying' && tri.source && tri.source.identity == 'fan' && tri.source != target) {
									var num = game.countPlayer(function (current) {
										if (current.identity == 'fan') {
											return current.countCards('h', 'tao');
										}
									});
									if (num > 1 && player == target) return 2;
									return 0;
								}
							}
							if (mode == 'identity' && player.identity == 'zhu' && target.identity == 'nei') {
								if (tri && tri.name == 'dying' && tri.source && tri.source.identity == 'zhong') {
									return 0;
								}
							}
							if (mode == 'stone' && target.isMin() &&
								player != target && tri && tri.name == 'dying' && player.side == target.side &&
								tri.source != target.getEnemy()) {
								return 0;
							}
							return 2;
						},
					},
					tag: {
						recover: 1,
						save: 1,
					}
				}
			},
			bagua: {
				fullskin: true,
				type: 'equip',
				subtype: 'equip2',
				ai: {
					basic: {
						equipValue: 7.5
					}
				},
				skills: ['bagua_skill']
			},
			dilu: {
				fullskin: true,
				type: 'equip',
				subtype: 'equip3',
				distance: { globalTo: 1 },
			},
			zhuahuang: {
				fullskin: true,
				type: 'equip',
				subtype: 'equip3',
				distance: { globalTo: 1 },
			},
			chitu: {
				fullskin: true,
				type: 'equip',
				subtype: 'equip4',
				distance: { globalFrom: -1 },
			},
			dawan: {
				fullskin: true,
				type: 'equip',
				subtype: 'equip4',
				distance: { globalFrom: -1 },
			},
			zhuge: {
				fullskin: true,
				type: 'equip',
				subtype: 'equip1',
				ai: {
					order: function () {
						return get.order({ name: 'sha' }) - 0.1;
					},
					equipValue: function (card, player) {
						if (player._zhuge_temp) return 1;
						player._zhuge_temp = true;
						var result = function () {
							if (!game.hasPlayer(function (current) {
								return get.distance(player, current) <= 1 && player.canUse('sha', current) && get.effect(current, { name: 'sha' }, player, player) > 0;
							})) {
								return 1;
							}
							if (player.hasSha() && _status.currentPhase == player) {
								if (player.getEquip('zhuge') && player.countUsed('sha') || player.getCardUsable('sha') == 0) {
									return 10;
								}
							}
							var num = player.countCards('h', 'sha');
							if (num > 1) return 6 + num;
							return 3 + num;
						}();
						delete player._zhuge_temp;
						return result;
					},
					basic: {
						equipValue: 5
					},
					tag: {
						valueswap: 1
					}
				},
				skills: ['zhuge_skill']
			},
			cixiong: {
				fullskin: true,
				type: 'equip',
				subtype: 'equip1',
				distance: { attackFrom: -1 },
				ai: {
					basic: {
						equipValue: 2
					}
				},
				skills: ['cixiong_skill']
			},
			zhangba: {
				fullskin: true,
				type: 'equip',
				subtype: 'equip1',
				distance: { attackFrom: -2 },
				ai: {
					equipValue: function (card, player) {
						var num = 2.5 + player.countCards('h') / 3;
						return Math.min(num, 4);
					},
					basic: {
						equipValue: 3.5
					}
				},
				skills: ['zhangba_skill']
			},
			guanshi: {
				fullskin: true,
				type: 'equip',
				subtype: 'equip1',
				distance: { attackFrom: -2 },
				ai: {
					equipValue: function (card, player) {
						var num = 2.5 + (player.countCards('h') + player.countCards('e')) / 2.5;
						return Math.min(num, 5);
					},
					basic: {
						equipValue: 4.5,
					}
				},
				skills: ['guanshi_skill']
			},
			wugu: {
				audio: true,
				fullskin: true,
				type: 'trick',
				enable: true,
				cardcolor: 'red',
				selectTarget: -1,
				filterTarget: true,
				contentBefore: function () {
					"step 0"
					if (!targets.length) {
						event.finish();
						return;
					}
					if (get.is.versus()) {
						player.chooseControl('顺时针', '逆时针', function (event, player) {
							if (player.next.side == player.side) return '逆时针';
							return '顺时针';
						}).set('prompt', '选择' + get.translation(card) + '的结算方向');
					}
					else {
						event.goto(2);
					}
					"step 1"
					if (result && result.control == '顺时针') {
						var evt = event.getParent();
						evt.fixedSeat = true;
						evt.targets.sortBySeat();
						evt.targets.reverse();
						if (evt.targets[evt.targets.length - 1] == player) {
							evt.targets.unshift(evt.targets.pop());
						}
					}
					"step 2"
					ui.clear();
					var num;
					if (event.targets) {
						num = event.targets.length;
					}
					else {
						num = game.countPlayer();
					}
					var cards = get.cards(num);
					game.cardsGotoOrdering(cards).relatedEvent = event.getParent();
					var dialog = ui.create.dialog('五谷丰登', cards, true, 'hidden');
					dialog.hide();
					dialog.content.style.width = '80%';
					dialog.character = document.createElement('div');
					dialog.character.style.width = '20%';
					dialog.character.style.height = '80%';
					dialog.character.style.top = '14%';
					dialog.character.style.right = '2px';
					dialog.character.style.margin = '8px';
					dialog.character.setBackgroundImage('image/character/nocharacter.jpg');
					dialog.character.style['background-position-x'] = 'center';
					dialog.character.style.zIndex = '-1';
					dialog.character.style['border-radius'] = '8px';
					dialog.character.style['box-shadow'] = 'rgb(89 84 68) 0 0 0 2px, rgb(47 44 34 / 60%) 0 3px 10px';
					dialog.character.style['background-size'] = 'cover';
					dialog.contentContainer.appendChild(dialog.character);
					dialog.open();

					_status.dieClose.push(dialog);
					dialog.videoId = lib.status.videoId++;
					game.addVideo('cardDialog', null, ['五谷丰登', get.cardsInfo(cards), dialog.videoId]);
					event.getParent().preResult = dialog.videoId;
					game.broadcast(function (cards, id) {
						var dialog = ui.create.dialog('五谷丰登', cards, true, 'hidden');
						dialog.content.style.width = '80%';
						dialog.character = document.createElement('div');
						dialog.character.style.width = '20%';
						dialog.character.style.height = '80%';
						dialog.character.style.top = '14%';
						dialog.character.style.right = '2px';
						dialog.character.style.margin = '8px';
						dialog.character.setBackgroundImage('image/character/nocharacter.jpg');
						dialog.character.style['background-position-x'] = 'center';
						dialog.character.style.zIndex = '-1';
						dialog.character.style['border-radius'] = '8px';
						dialog.character.style['box-shadow'] = 'rgb(89 84 68) 0 0 0 2px, rgb(47 44 34 / 60%) 0 3px 10px';
						dialog.character.style['background-size'] = 'cover';
						dialog.contentContainer.appendChild(dialog.character);
						dialog.open();

						_status.dieClose.push(dialog);
						dialog.videoId = id;
					}, cards, dialog.videoId);
					game.log(event.card, '亮出了', cards);
				},
				content: function () {
					"step 0"
					for (var i = 0; i < ui.dialogs.length; i++) {
						if (ui.dialogs[i].videoId == event.preResult) {
							event.dialog = ui.dialogs[i]; break;
						}
					}
					if (!event.dialog) {
						event.finish();
						return;
					}
					if (event.dialog.buttons.length > 1) {
						event.dialog.character.setBackgroundImage('image/character/' + target.name + '.jpg');
						game.broadcast(function (target, id) {
							var dialog = get.idDialog(id);
							dialog.character.setBackgroundImage('image/character/' + target.name + '.jpg');
						}, target, event.preResult);
						var next = target.chooseButton(true, function (button) {
							return get.value(button.link, _status.event.player);
						});

						next.set('dialog', event.preResult);
						next.set('closeDialog', false);
						next.set('dialogdisplay', true);
					}
					else {
						event.directButton = event.dialog.buttons[0];
					}
					"step 1"
					var dialog = event.dialog;
					var card;
					if (event.directButton) {
						card = event.directButton.link;
					}
					else {
						for (var i of dialog.buttons) {
							if (i.link == result.links[0]) {
								card = i.link;
								break;
							}
						}
						if (!card) card = event.dialog.buttons[0].link;
					}

					var button;
					for (var i = 0; i < dialog.buttons.length; i++) {
						if (dialog.buttons[i].link == card) {
							button = dialog.buttons[i];
							button.querySelector('.info').innerHTML = function (target) {
								if (target._tempTranslate) return target._tempTranslate;
								var name = target.name;
								if (lib.translate[name + '_ab']) return lib.translate[name + '_ab'];
								return get.verticalStr(get.translation(name));
							}(target);
							dialog.buttons.remove(button);
							break;
						}
					}
					var capt = get.translation(target) + '选择了' + get.translation(button.link);
					if (card) {
						target.gain(card, 'visible');
						target.$gain2(card);
						game.broadcast(function (card, id, name, capt) {
							var dialog = get.idDialog(id);
							if (dialog) {
								dialog.content.firstChild.innerHTML = capt;
								for (var i = 0; i < dialog.buttons.length; i++) {
									if (dialog.buttons[i].link == card) {
										dialog.buttons[i].querySelector('.info').innerHTML = name;
										dialog.buttons.splice(i--, 1);
										break;
									}
								}
							}
						}, card, dialog.videoId, function (target) {
							if (target._tempTranslate) return target._tempTranslate;
							var name = target.name;
							if (lib.translate[name + '_ab']) return lib.translate[name + '_ab'];
							return get.verticalStr(get.translation(name));
						}(target), capt);
					}
					dialog.content.firstChild.innerHTML = capt;
					game.addVideo('dialogCapt', null, [dialog.videoId, dialog.content.firstChild.innerHTML]);
					game.log(target, '选择了', button.link);
					game.delay();
				},
				contentAfter: function () {
					for (var i = 0; i < ui.dialogs.length; i++) {
						if (ui.dialogs[i].videoId == event.preResult) {
							var dialog = ui.dialogs[i];
							dialog.close();
							_status.dieClose.remove(dialog);
							if (dialog.buttons.length) {
								event.remained = [];
								for (var i = 0; i < dialog.buttons.length; i++) {
									event.remained.push(dialog.buttons[i].link);
								}
								event.trigger('wuguRemained');
							}
							break;
						}
					}
					game.broadcast(function (id) {
						var dialog = get.idDialog(id);
						if (dialog) {
							dialog.close();
							_status.dieClose.remove(dialog);
						}
					}, event.preResult);
					game.addVideo('cardDialog', null, event.preResult);
				},
				ai: {
					wuxie: function () {
						if (Math.random() < 0.5) return 0;
					},
					basic: {
						order: 3,
						useful: 0.5,
					},
					result: {
						target: function (player, target) {
							if (get.is.versus()) {
								if (target == player) return 1.5;
								return 1;
							}
							if (player.hasUnknown(2)) {
								return 0;
							}
							return (1 - get.distance(player, target, 'absolute') / game.countPlayer()) * get.attitude(player, target) > 0 ? 0.5 : 0.7;
						}
					},
					tag: {
						draw: 1,
						multitarget: 1
					}
				}
			},
			taoyuan: {
				audio: true,
				fullskin: true,
				type: 'trick',
				enable: true,
				selectTarget: -1,
				cardcolor: 'red',
				reverseOrder: true,
				yingbian_prompt: '当你使用此牌选择目标后，你可为此牌减少一个目标',
				yingbian_tags: ['remove'],
				yingbian: function (event) {
					event.yingbian_removeTarget = true;
				},
				filterTarget: function (card, player, target) {
					//return target.hp<target.maxHp;
					return true;
				},
				ignoreTarget: function (card, player, target) {
					return target.isHealthy();
				},
				content: function () {
					target.recover();
				},
				ai: {
					basic: {
						order: function () {
							return 11;
						},
						useful: [3, 1],
						value: 0,
					},
					result: {
						target: function (player, target) {
							return (target.hp < target.maxHp) ? 2 : 0;
						}
					},
					tag: {
						recover: 0.5,
						multitarget: 1
					}
				}
			},
			nanman: {
				audio: true,
				fullskin: true,
				type: 'trick',
				enable: true,
				selectTarget: -1,
				yingbian_prompt: '当你使用此牌选择目标后，你可为此牌减少一个目标',
				yingbian_tags: ['remove'],
				yingbian: function (event) {
					event.yingbian_removeTarget = true;
				},
				filterTarget: function (card, player, target) {
					return target != player;
				},
				reverseOrder: true,
				content: function () {
					"step 0"
					if (typeof event.baseDamage != 'number') event.baseDamage = 1;
					if (event.directHit) event._result = { bool: false };
					else {
						var next = target.chooseToRespond({ name: 'sha' });
						next.set('ai', function (card) {
							var evt = _status.event.getParent();
							if (get.damageEffect(evt.target, evt.player, evt.target) >= 0) return 0;
							if (evt.target.getCards('e', { subtype: 'equip2' })[0] && evt.target.getCards('e', { subtype: 'equip2' })[0].name == 'Ahuasan') return 0;
							if (evt.player.hasSkillTag('notricksource')) return 0;
							if (evt.target.hasSkillTag('notrick')) return 0;
							return get.order(card);
						});
						next.autochoose = lib.filter.autoRespondSha;
					}
					"step 1"
					if (result.bool == false) {
						target.damage(event.baseDamage, event.customSource || player);
					}
				},
				ai: {
					wuxie: function (target, card, player, viewer) {
						if (get.attitude(viewer, target) > 0 && target.countCards('h', 'sha')) {
							if (!target.countCards('h') || target.hp == 1 || Math.random() < 0.7) return 0;
						}
					},
					basic: {
						order: 9,
						useful: [5, 1],
						value: 5
					},
					result: {
						target_use: function (player, target) {
							if (player.hasUnknown(2) && get.mode() != 'guozhan') return 0;
							var nh = target.countCards('h');
							if (get.mode() == 'identity') {
								if (target.isZhu && nh <= 2 && target.hp <= 1) return -100;
							}
							if (nh == 0) return -2;
							if (nh == 1) return -1.7
							return -1.5;
						},
						target: function (player, target) {
							var nh = target.countCards('h');
							if (get.mode() == 'identity') {
								if (target.isZhu && nh <= 2 && target.hp <= 1) return -100;
							}
							if (nh == 0) return -2;
							if (nh == 1) return -1.7
							return -1.5;
						},
					},
					tag: {
						respond: 1,
						respondSha: 1,
						damage: 1,
						multitarget: 1,
						multineg: 1,
					}
				}
			},
			wanjian: {
				audio: true,
				fullskin: true,
				type: 'trick',
				enable: true,
				selectTarget: -1,
				reverseOrder: true,
				yingbian_prompt: '当你使用此牌选择目标后，你可为此牌减少一个目标',
				yingbian_tags: ['remove'],
				yingbian: function (event) {
					event.yingbian_removeTarget = true;
				},
				filterTarget: function (card, player, target) {
					return target != player;
				},
				content: function () {
					"step 0"
					if (typeof event.baseDamage != 'number') event.baseDamage = 1;
					if (event.directHit) event._result = { bool: false };
					else {
						var next = target.chooseToRespond({ name: 'shan' });
						next.set('ai', function (card) {
							var evt = _status.event.getParent();
							if (get.damageEffect(evt.target, evt.player, evt.target) >= 0) return 0;
							if (evt.target.getCards('e', { subtype: 'equip2' })[0] && evt.target.getCards('e', { subtype: 'equip2' })[0].name == 'Ahuasan') return 0;
							if (evt.player.hasSkillTag('notricksource')) return 0;
							if (evt.target.hasSkillTag('notrick')) return 0;
							if (evt.target.hasSkillTag('noShan')) {
								return -1;
							}
							return get.order(card);
						});
						next.autochoose = lib.filter.autoRespondShan;
					}
					"step 1"
					if (result.bool == false) {
						target.damage(event.baseDamage);
					}
				},
				ai: {
					wuxie: function (target, card, player, viewer) {
						if (get.attitude(viewer, target) > 0 && target.countCards('h', 'shan')) {
							if (!target.countCards('h') || target.hp == 1 || Math.random() < 0.7) return 0;
						}
					},
					basic: {
						order: 9,
						useful: 1,
						value: 5
					},
					result: {
						target_use: function (player, target) {
							if (player.hasUnknown(2) && get.mode() != 'guozhan') return 0;
							var nh = target.countCards('h');
							if (get.mode() == 'identity') {
								if (target.isZhu && nh <= 2 && target.hp <= 1) return -100;
							}
							if (nh == 0) return -2;
							if (nh == 1) return -1.7
							return -1.5;
						},
						target: function (player, target) {
							var nh = target.countCards('h');
							if (get.mode() == 'identity') {
								if (target.isZhu && nh <= 2 && target.hp <= 1) return -100;
							}
							if (nh == 0) return -2;
							if (nh == 1) return -1.7
							return -1.5;
						},
					},
					tag: {
						respond: 1,
						respondShan: 1,
						damage: 1,
						multitarget: 1,
						multineg: 1,
					}
				}
			},
			manzu: {
				audio: true,
				fullskin: true,
				type: 'trick',
				enable: true,
				selectTarget: -1,
				cardcolor: 'red',
				toself: true,
				delay_prompt: '出牌阶段对一名角色使用，将该牌置入其判定区内。若判定结果不为黑桃，其摸四张牌，然后弃置两张牌。',
				filterTarget: function (card, player, target) {
					return target == player;
				},
				modTarget: true,
				content: function () {
					if (get.is.versus()) {
						if (game.friend.contains(target)) {
							if (game.friend.length < game.enemy.length) {
								target.draw(3); return;
							}
						}
						else {
							if (game.friend.length > game.enemy.length) {
								target.draw(3); return;
							}
						}
					}
					target.draw(2);
				},
				ai: {
					basic: {
						order: 7.2,
						useful: 4.5,
						value: 9.2
					},
					result: {
						target: 2,
					},
					tag: {
						draw: 2
					}
				}
			},
			juedou: {
				audio: true,
				fullskin: true,
				type: 'trick',
				enable: true,
				yingbian_prompt: '你令此牌不可被响应',
				yingbian_tags: ['hit'],
				yingbian: function (event) {
					event.directHit.addArray(game.players);
				},
				filterTarget: function (card, player, target) {
					return target != player;
				},
				content: function () {
					"step 0"
					if (event.turn == undefined) event.turn = target;
					if (typeof event.baseDamage != 'number') event.baseDamage = 1;
					if (typeof event.extraDamage != 'number') {
						event.extraDamage = 0;
					}
					if (!event.shaReq) event.shaReq = {};
					if (typeof event.shaReq[player.playerid] != 'number') event.shaReq[player.playerid] = 1;
					if (typeof event.shaReq[target.playerid] != 'number') event.shaReq[target.playerid] = 1;
					event.playerCards = [];
					event.targetCards = [];
					"step 1"
					event.trigger('juedou');
					event.shaRequired = event.shaReq[event.turn.playerid];
					"step 2"
					if (event.directHit) {
						event._result = { bool: false };
					}
					else {
						var next = event.turn.chooseToRespond({ name: 'sha' });
						if (event.shaRequired > 1) {
							next.set('prompt2', '共需打出' + event.shaRequired + '张杀')
						}
						next.set('ai', function (card) {
							var event = _status.event;
							var player = event.splayer;
							var target = event.starget;
							if (player.hasSkillTag('notricksource')) return 0;
							if (target.hasSkillTag('notrick')) return 0;
							if (event.shaRequired > 1 && player.countCards('h', 'sha') < event.shaRequired) return 0;
							if (event.player == target) {
								if (player.hasSkill('naman')) return -1;
								if (get.attitude(target, player) < 0 || event.player.hp <= 1) {
									return get.order(card);
								}
								return -1;
							}
							else {
								if (target.hasSkill('naman')) return -1;
								if (get.attitude(player, target) < 0 || event.player.hp <= 1) {
									return get.order(card);
								}
								return -1;
							}
						});
						next.set('splayer', player);
						next.set('starget', target);
						next.set('shaRequired', event.shaRequired);
						next.autochoose = lib.filter.autoRespondSha;
						if (event.turn == target) {
							next.source = player;
						}
						else {
							next.source = target;
						}
					}
					"step 3"
					if (event.target.isDead() || event.player.isDead()) {
						event.finish();
					}
					else {
						if (result.bool) {
							event.shaRequired--;
							if (event.turn == target) {
								if (result.cards) event.targetCards.addArray(result.cards);
								if (event.shaRequired > 0) event.goto(2);
								else {
									event.turn = player;
									event.goto(1);
								}
							}
							else {
								if (result.cards) event.playerCards.addArray(result.cards);
								if (event.shaRequired > 0) event.goto(2);
								else {
									event.turn = target;
									event.goto(1);
								}
							}
						}
						else {
							if (event.turn == target) {
								target.damage(event.baseDamage + event.extraDamage);
							}
							else {
								player.damage(target, event.baseDamage + event.extraDamage);
							}
						}
					}
				},
				ai: {
					wuxie: function (target, card, player, viewer) {
						if (player == game.me && get.attitude(viewer, player) > 0) {
							return 0;
						}
					},
					basic: {
						order: 5,
						useful: 1,
						value: 5.5
					},
					result: {
						target: -1.5,
						player: function (player, target, card) {
							if (player.hasSkillTag('directHit_ai', true, {
								target: target,
								card: card,
							}, true)) {
								return 0;
							}
							if (get.damageEffect(target, player, target) > 0 && get.attitude(player, target) > 0 && get.attitude(target, player) > 0) {
								return 0;
							}
							var hs1 = target.getCards('h', 'sha');
							var hs2 = player.getCards('h', 'sha');
							if (hs1.length > hs2.length + 1) {
								return -2;
							}
							var hsx = target.getCards('h');
							if (hsx.length > 2 && hs2.length == 0 && hsx[0].number < 6) {
								return -2;
							}
							if (hsx.length > 3 && hs2.length == 0) {
								return -2;
							}
							if (hs1.length > hs2.length && (!hs2.length || hs1[0].number > hs2[0].number)) {
								return -2;
							}
							return -0.5;
						}
					},
					tag: {
						respond: 2,
						respondSha: 2,
						damage: 1,
					}
				}
			},
			shunshou: {
				audio: true,
				fullskin: true,
				type: 'trick',
				enable: true,
				range: { global: 1 },
				delay_prompt: '出牌阶段对其他角色使用，将该牌置入其判定区内。若判定结果小于J，你可以将其区域里的一张牌置入另一名角色区域相应位置。',
				selectTarget: 1,
				postAi: function (targets) {
					return targets.length == 1 && targets[0].countCards('j');
				},
				filterTarget: function (card, player, target) {
					if (player == target) return false;
					return target.countGainableCards(player, get.is.single() ? 'he' : 'hej') > 0;
				},
				content: function () {
					var position = get.is.single() ? 'he' : 'hej';
					if (target.countGainableCards(player, position)) {
						player.gainPlayerCard(position, target, true);
					}
				},
				ai: {
					wuxie: function (target, card, player, viewer) {
						if (get.attitude(viewer, player) > 0 && get.attitude(viewer, target) > 0) {
							return 0;
						}
					},
					basic: {
						order: 7.5,
						useful: 4,
						value: 9
					},
					result: {
						target: function (player, target) {
							if (get.attitude(player, target) <= 0) return (target.countCards('he', function (card) {
								return get.value(card, target) > 0 && card != target.getEquip('jinhe');
							}) > 0) ? -1.5 : 1.5;
							return (target.countCards('ej', function (card) {
								if (get.position(card) == 'e') return get.value(card, target) <= 0;
								var cardj = card.viewAs ? { name: card.viewAs } : card;
								return get.effect(target, cardj, target, player) < 0;
							}) > 0) ? 1.5 : -1.5;
						},
						player: function (player, target) {
							if (get.attitude(player, target) < 0 && !target.countCards('he', function (card) {
								return get.value(card, target) > 0 && card != target.getEquip('jinhe');
							})) {
								return 0;
							}
							if (get.attitude(player, target) > 1) {
								return (target.countCards('ej', function (card) {
									if (get.position(card) == 'e') return get.value(card, target) <= 0;
									var cardj = card.viewAs ? { name: card.viewAs } : card;
									return get.effect(target, cardj, target, player) < 0;
								}) > 0) ? 1.5 : -1.5;
							}
							return 1;
						}
					},
					tag: {
						loseCard: 1,
						gain: 1,
					}
				}
			},
			shunshou_copy: {
				ai: {
					basic: {
						order: 7.5,
						useful: 4,
						value: 9
					},
					result: {
						target: function (player, target) {
							if (get.attitude(player, target) <= 0) return (target.countCards('he', function (card) {
								return get.value(card, target) > 0 && card != target.getEquip('jinhe');
							}) > 0) ? -1.5 : 1.5;
							return (target.countCards('ej', function (card) {
								if (get.position(card) == 'e') return get.value(card, target) <= 0;
								var cardj = card.viewAs ? { name: card.viewAs } : card;
								return get.effect(target, cardj, target, player) < 0;
							}) > 0) ? 1.5 : -1.5;
						},
						player: function (player, target) {
							if (get.attitude(player, target) < 0 && !target.countCards('he', function (card) {
								return get.value(card, target) > 0 && card != target.getEquip('jinhe');
							})) {
								return 0;
							}
							if (get.attitude(player, target) > 1) {
								return (target.countCards('ej', function (card) {
									if (get.position(card) == 'e') return get.value(card, target) <= 0;
									var cardj = card.viewAs ? { name: card.viewAs } : card;
									return get.effect(target, cardj, target, player) < 0;
								}) > 0) ? 1.5 : -1.5;
							}
							return 1;
						}
					},
					tag: {
						loseCard: 1,
						gain: 1,
					}
				}
			},
			shunshou_copy2: {
				ai: {
					basic: {
						order: 7.5,
						useful: 4,
						value: 9
					},
					result: {
						target: function (player, target) {
							if (get.attitude(player, target) <= 0) return (target.countCards('he', function (card) {
								return get.value(card, target) > 0 && card != target.getEquip('jinhe');
							}) > 0) ? -1.5 : 1.5;
							return (target.countCards('e', function (card) {
								return get.value(card, target) <= 0;
							}) > 0) ? 1.5 : -1.5;
						},
						player: function (player, target) {
							if (get.attitude(player, target) < 0 && !target.countCards('he', function (card) {
								return get.value(card, target) > 0 && card != target.getEquip('jinhe');
							})) {
								return 0;
							}
							if (get.attitude(player, target) > 1) {
								return (target.countCards('ej', function (card) {
									if (get.position(card) == 'e') return get.value(card, target) <= 0;
									var cardj = card.viewAs ? { name: card.viewAs } : card;
									return get.effect(target, cardj, target, player) < 0;
								}) > 0) ? 1.5 : -1.5;
							}
							return 1;
						}
					},
					tag: {
						loseCard: 1,
						gain: 1,
					}
				}
			},
			guohe: {
				audio: true,
				fullskin: true,
				type: 'trick',
				enable: true,
				selectTarget: 1,
				postAi: function (targets) {
					return targets.length == 1 && targets[0].countCards('j');
				},
				filterTarget: function (card, player, target) {
					if (player == target) return false;
					return target.countDiscardableCards(player, get.is.single() ? 'he' : 'hej');
				},
				delay_prompt: '出牌阶段对其他角色使用，将该牌置入其判定区内。若判定结果大于3，你可以弃置其每个区域里的一张牌。',
				yingbian_prompt: '当你使用此牌选择目标后，你可为此牌增加一个目标',
				yingbian_tags: ['add'],
				yingbian: function (event) {
					event.yingbian_addTarget = true;
				},
				content: function () {
					'step 0'
					if (!get.is.single() && target.countDiscardableCards(player, 'hej')) {
						player.discardPlayerCard('hej', target, true);
						event.finish();
					}
					else {
						var bool1 = target.countDiscardableCards(player, 'h');
						var bool2 = target.countDiscardableCards(player, 'e');
						if (bool1 && bool2) {
							player.chooseControl('手牌区', '装备区').set('ai', function () {
								return Math.random() < 0.5 ? 1 : 0;
							}).set('prompt', '弃置' + (get.translation(target)) + '装备区的一张牌，或观看其手牌并弃置其中的一张牌。');
						}
						else event._result = { control: bool1 ? '手牌区' : '装备区' };
					}
					'step 1'
					var pos = result.control == '手牌区' ? 'h' : 'e';
					player.discardPlayerCard(target, pos, true, 'visible');
				},
				ai: {
					basic: {
						order: 9,
						useful: 5,
						value: 7,
					},
					yingbian: function (card, player, targets, viewer) {
						if (get.attitude(viewer, player) <= 0) return 0;
						if (game.hasPlayer(function (current) {
							return !targets.contains(current) && lib.filter.targetEnabled2(card, player, current) && get.effect(current, card, player, player) > 0;
						})) return 6;
						return 0;
					},
					result: {
						target: function (player, target) {
							var att = get.attitude(player, target);
							var nh = target.countCards('h');
							if (att > 0) {
								if (target.countCards('j', function (card) {
									var cardj = card.viewAs ? { name: card.viewAs } : card;
									if (target.hasSkill('dahuo') && target.countCards('j') == 1) return -2;
									if (get.tag(cardj, 'delay') == 'good') return false;
									return get.effect(target, cardj, target, player) < 0;
								}) > 0) return 3;
								if (target.getEquip('baiyin') && target.isDamaged() &&
									get.recoverEffect(target, player, player) > 0) {
									if (target.hp == 1 && !target.hujia) return 1.6;
								}
								if (target.countCards('e', function (card) {
									if (get.position(card) == 'e') return get.value(card, target) < 0;
								}) > 0) return 1;
							}
							var es = target.getCards('e');
							var noe = (es.length == 0 || target.hasSkillTag('noe'));
							var noe2 = (es.filter(function (esx) {
								return get.value(esx, target) > 0;
							}).length == 0);
							var noh = (nh == 0 || target.hasSkillTag('noh'));
							if (noh && (noe || noe2)) return 0;
							if (att <= 0) {
								if (target.countCards('j', function (card) {
									var cardj = card.viewAs ? { name: card.viewAs } : card;
									if (target.hasSkill('dahuo') && target.countCards('j') == 1) return 2;
									if (get.tag(cardj, 'delay') == 'bad') return false;
									return get.effect(target, cardj, target, player) > 0;
								}) > 0) return -3;
								if (!target.countCards('he'))
									return -1.5;
							}
							return -1.5;
						},
					},
					tag: {
						loseCard: 1,
						discard: 1
					}
				}
			},
			guohe_copy: {
				ai: {
					basic: {
						order: 9,
						useful: 5,
						value: 5,
					},
					result: {
						target: function (player, target) {
							var att = get.attitude(player, target);
							var nh = target.countCards('h');
							if (att > 0) {
								if (target.countCards('j', function (card) {
									var cardj = card.viewAs ? { name: card.viewAs } : card;
									return get.effect(target, cardj, target, player) < 0;
								}) > 0) return 3;
								if (target.getEquip('baiyin') && target.isDamaged() &&
									get.recoverEffect(target, player, player) > 0) {
									if (target.hp == 1 && !target.hujia) return 1.6;
								}
								if (target.countCards('e', function (card) {
									if (get.position(card) == 'e') return get.value(card, target) < 0;
								}) > 0) return 1;
							}
							var es = target.getCards('e');
							var noe = (es.length == 0 || target.hasSkillTag('noe'));
							var noe2 = (es.filter(function (esx) {
								return get.value(esx, target) > 0;
							}).length == 0);
							var noh = (nh == 0 || target.hasSkillTag('noh'));
							if (noh && (noe || noe2)) return 0;
							if (att <= 0 && !target.countCards('he')) return 1.5;
							return -1.5;
						},
					},
					tag: {
						loseCard: 1,
						discard: 1
					}
				}
			},
			guohe_copy2: {
				ai: {
					basic: {
						order: 9,
						useful: 5,
						value: 5,
					},
					result: {
						target: function (player, target) {
							var att = get.attitude(player, target);
							var nh = target.countCards('h');
							if (att > 0) {
								if (target.getEquip('baiyin') && target.isDamaged() &&
									get.recoverEffect(target, player, player) > 0) {
									if (target.hp == 1 && !target.hujia) return 1.6;
								}
								if (target.countCards('e', function (card) {
									if (get.position(card) == 'e') return get.value(card, target) < 0;
								}) > 0) return 1;
							}
							var es = target.getCards('e');
							var noe = (es.length == 0 || target.hasSkillTag('noe'));
							var noe2 = (es.filter(function (esx) {
								return get.value(esx, target) > 0;
							}).length == 0);
							var noh = (nh == 0 || target.hasSkillTag('noh'));
							if (noh && (noe || noe2)) return 0;
							if (att <= 0 && !target.countCards('he')) return 1.5;
							return -1.5;
						},
					},
					tag: {
						loseCard: 1,
						discard: 1
					}
				}
			},
			jiedao: {
				audio: true,
				fullskin: true,
				type: 'trick',
				enable: true,
				selectTarget: 2,
				singleCard: true,
				multitarget: true,
				targetprompt: ['被借刀', '出杀目标'],
				complexTarget: true,
				multicheck: function () {
					return game.hasPlayer(function (current) {
						if (current.getEquip(1)) {
							return game.hasPlayer(function (current2) {
								return lib.filter.filterTarget({ name: 'sha' }, current, current2);
							})
						}
					});
				},
				filterTarget: function (card, player, target) {
					if (ui.selected.targets.length == 0) {
						return (player != target && target.getCards('e', { subtype: 'equip1' }).length);
					}
					else {
						return lib.filter.filterTarget({ name: 'sha' }, ui.selected.targets[0], target);
					}
				},
				content: function () {
					"step 0"
					if (event.directHit || (!_status.connectMode && lib.config.skip_shan && !target.hasSha())) {
						event.directfalse = true;
					}
					else {
						target.chooseToUse('对' + get.translation(event.addedTarget) + '使用一张杀，或令' + get.translation(player) + '获得你的武器牌', function (card, player) {
							if (get.name(card) != 'sha') return false;
							return lib.filter.filterCard.apply(this, arguments);
						}).set('targetRequired', true).set('complexSelect', true).set('filterTarget', function (card, player, target) {
							if (target != _status.event.sourcex && !ui.selected.targets.contains(_status.event.sourcex)) return false;
							return lib.filter.filterTarget.apply(this, arguments);
						}).set('sourcex', event.addedTarget).set('addCount', false).set('respondTo', [player, card]);
					}
					"step 1"
					if (event.directfalse || result.bool == false) {
						var cards = target.getCards('e', { subtype: 'equip1' });
						if (cards.length) player.gain(cards, target, 'give');
					}
				},
				ai: {
					wuxie: function (target, card, player, viewer) {
						if (player == game.me && get.attitude(viewer, player) > 0) {
							return 0;
						}
					},
					basic: {
						order: 8,
						value: 2,
						useful: 1,
					},
					result: {
						target: -1.5,
						player: function (player) {
							if (player.getCards('he', { subtype: 'equip1' }).length) return 0;
							return 1.5;
						},
					},
					tag: {
						gain: 1,
						use: 1,
						useSha: 1,
						loseCard: 1,
					}
				}
			},
			wuxie: {
				audio: true,
				fullskin: true,
				type: 'trick',
				ai: {
					basic: {
						useful: [6, 4, 3],
						value: [6, 4, 3],
					},
					result: { player: 1 },
					expose: 0.2
				},
				notarget: true,
				yingbian_tags: ['gain', 'draw'],
				yingbian_prompt: function (card) {
					if (!get.cardtag(card, 'yingbian_gain')) return '当你声明使用此牌时，你摸一张牌';
					return '当此牌生效后，你获得此牌响应的目标牌';
				},
				yingbian: function (event) {
					if (!get.cardtag(event.card, 'yingbian_gain') || get.cardtag(event.card, 'yingbian_draw')) event.player.draw();
				},
				contentBefore: function () {
					'step 0'
					if (get.mode() == 'guozhan' && get.cardtag(card, 'guo')) {
						var trigger = event.getParent(2);
						if (trigger.triggername != 'phaseJudge' && !trigger.statecard && trigger.target.identity != 'ye' && trigger.target.identity != 'unknown') {
							player.chooseControl('对单体使用', '对势力使用').set('prompt', '请选择' + get.translation(card) + '的使用方式').set('ai', function () {
								return '对势力使用'
							});
						}
						else event.finish();
					}
					else event.finish();
					'step 1'
					if (result.control == '对势力使用') {
						player.chat('对势力使用');
						event.getParent(2).guowuxie = true;
					}
				},
				content: function () {
					var evt = event.getParent();
					event.result = {
						wuxied: true,
						directHit: evt.directHit || [],
						nowuxie: evt.nowuxie,
					};
					if (player.isOnline()) {
						player.send(function (player) {
							if (ui.tempnowuxie && !player.hasWuxie()) {
								ui.tempnowuxie.close();
								delete ui.tempnowuxie;
							}
						}, player);
					}
					else if (player == game.me) {
						if (ui.tempnowuxie && !player.hasWuxie()) {
							ui.tempnowuxie.close();
							delete ui.tempnowuxie;
						}
					}
					if (event.card.yingbian && get.cardtag(event.card, 'yingbian_gain')) {
						var cardx = event.getParent().respondTo;
						if (cardx && cardx[1] && cardx[1].cards && cardx[1].cards.filterInD('od').length) player.gain(cardx[1].cards.filterInD('od'), 'gain2', 'log');
					}
				},
			},
			lebu: {
				audio: true,
				fullskin: true,
				type: 'delay',
				filterTarget: function (card, player, target) {
					return (lib.filter.judge(card, player, target) && player != target);
				},
				judge: function (card) {
					if (get.suit(card) == 'heart') return 1;
					return -2;
				},
				judge2: function (result) {
					if (result.bool == false) return true;
					return false;
				},
				effect: function () {
					if (result.bool == false) {
						player.skip('phaseUse');
					}
				},
				ai: {
					basic: {
						order: 1,
						useful: 1,
						value: 8,
					},
					result: {
						target: function (player, target) {
							var num = target.hp - target.countCards('h') - 2;
							if (num > -1) return -0.01;
							if (target.hp < 3) num--;
							if (target.isTurnedOver()) num /= 2;
							var dist = get.distance(player, target, 'absolute');
							if (dist < 1) dist = 1;
							return num / Math.sqrt(dist);
						}
					},
					tag: {
						delay: 'bad',
						skip: 'phaseUse'
					}
				}
			},
			shandian: {
				audio: true,
				fullskin: true,
				type: 'delay',
				cardnature: 'thunder',
				modTarget: function (card, player, target) {
					return lib.filter.judge(card, player, target);
				},
				enable: function (card, player) {
					return player.canAddJudge(card);
				},
				filterTarget: function (card, player, target) {
					return (lib.filter.judge(card, player, target) && player == target);
				},
				selectTarget: [-1, -1],
				judge: function (card) {
					if (get.suit(card) == 'spade' && get.number(card) > 1 && get.number(card) < 10) return -5;
					return 1;
				},
				judge2: function (result) {
					if (result.bool == false) return true;
					return false;
				},
				effect: function () {
					if (result.bool == false) {
						player.damage(3, 'thunder', 'nosource');
					}
					else {
						player.addJudgeNext(card);
					}
				},
				cancel: function () {
					player.addJudgeNext(card);
				},
				ai: {
					basic: {
						order: 1,
						useful: 0,
						value: 0,
					},
					result: {
						target: function (player, target) {
							var num = game.countPlayer(function (current) {
								var skills = current.getSkills();
								for (var j = 0; j < current.skills.length; j++) {
									var rejudge = get.tag(current.skills[j], 'rejudge', current);
									if (rejudge != undefined) {
										if (get.attitude(target, current) > 0 &&
											get.attitude(current, target) > 0) {
											return rejudge;
										}
										else {
											return -rejudge;
										}
									}
								}
							});
							if (num > 0) return num;
							if (num == 0) {
								var mode = get.mode();
								if (mode == 'identity') {
									if (target.identity == 'nei') return 1;
									var situ = get.situation();
									if (target.identity == 'fan') {
										if (situ > 1) return 1;
									}
									else {
										if (situ < -1) return 1;
									}
								}
								else if (mode == 'guozhan') {
									if (target.identity == 'ye') return 1;
									if (game.hasPlayer(function (current) {
										return current.identity == 'unknown';
									})) {
										return -1;
									}
									if (get.population(target.identity) == 1) {
										if (target.maxHp > 2 && target.hp < 2) return 1;
										if (game.countPlayer() < 3) return -1;
										if (target.hp <= 2 && target.countCards('he') <= 3) return 1;
									}
								}
							}
							return -1;
						}
					},
					tag: {
						delay: 'bad',
						// damage:1,
						// natureDamage:1,
						// thunderDamage:1,
					}
				}
			},
			du: {
				type: 'basic',
				fullskin: true,
				global: ['g_du', 'g_du_give'],
				content: function () { },
				ai: {
					value: function (card, player) {
						if (player.hp == 1) return 20;
						if (player.getEquip(2) == 'yinfengyi') return 10;
						if (player.hasSkillTag('maixie_loseHp')) return -10;
						if (player.hp > 2) return -5;
						return 4;
					},
					useful: 6,
					result: {
						player: function (player, target) {
							if (player.hasSkillTag('usedu')) return 5;
							return -1;
						}
					},
					order: 7.5
				},
			},
			guaguliaodu: {
				type: 'trick',
				fullskin: true,
				enable: true,
				delay_prompt: '出牌阶段对一名角色使用，将该牌置入其判定区内。其处于濒死状态或在判定阶段受伤时，任何判定结果均生效，其回复1点体力，然后弃置所有的毒（防止【毒】的体力流失）。若判定结果为红色，其摸一张牌。',
				filterTarget: function (card, player, target) {
					return target.isDamaged();
				},
				content: function () {
					'step 0'
					target.recover();
					'step 1'
					if (target.hasCard(function (card) {
						return _status.connectMode || get.name(card, target) == 'du';
					}, 'h')) target.chooseToDiscard('h', { name: 'du' }, '是否弃置一张【毒】？（不失去体力）').set('ai', () => 1);
				},
				ai: {
					basic: {
						order: 2,
						useful: 2,
						value: [6.5, 3, 3, 2],
					},
					tag: {
						recover: 1,
					},
					result: {
						target: 1.5,
					}
				},
			},
			shushangkaihua: {
				enable: true,
				fullskin: true,
				type: 'trick',
				selectTarget: -1,
				toself: true,
				filterTarget: function (card, player, target) {
					return target == player;
				},
				modTarget: true,
				content: function () {
					'step 0'
					if (!target.countCards('he')) {
						event.finish(); return;
					}
					target.chooseToDiscard(true, 'he', [1, 2]).set('ai', function (card) {
						if (!ui.selected.cards.length && get.type(card) == 'equip') return 8 - get.value(card);
						return 6 - get.value(card);
					});
					'step 1'
					if (result.bool && result.cards) {
						var bool = 0;
						for (var i = 0; i < result.cards.length; i++) {
							if (get.type(result.cards[i]) == 'equip') { bool = 1; break }
						}
						target.draw(result.cards.length + bool);
					}
				},
				ai: {
					wuxie: function () {
						return 0;
					},
					basic: {
						useful: 3,
						value: 3,
						order: 5
					},
					result: {
						target: function (player, target, card) {
							var cards = ui.selected.cards.concat(card.cards || []);
							var num = player.countCards('he', function (card) {
								if (cards.contains(card)) return false;
								if (get.type(card) == 'equip') return 8 > get.value(card);
								return 6 > get.value(card);
							});
							if (!num) return 0;
							if (player.countCards('he', function (card) {
								if (cards.contains(card)) return false;
								if (get.type(card) == 'equip') return 4 > get.value(card);
								return false;
							})) return 1.6;
							if (num < 2) return 0.5;
							return 1.2;
						},
					},
					tag: {
						loseCard: 1,
						discard: 1,
						norepeat: 1
					}
				},
			},
			chenghuodajie: {
				type: 'trick',
				fullskin: true,
				enable: true,
				filterTarget: function (card, player, target) {
					return target != player && target.countCards('h') > 0;
				},
				content: function () {
					'step 0'
					if (typeof event.baseDamage != 'number') event.baseDamage = 1;
					if (!target.countCards('h') || !player.isIn()) event.finish();
					else player.choosePlayerCard(target, 'h', true);
					'step 1'
					if (result.bool) {
						event.show_card = result.cards[0], str = get.translation(player);
						player.showCards(event.show_card);
						target.chooseControl().set('choiceList', [
							'令' + str + '获得' + get.translation(event.show_card),
							'受到' + str + '造成的' + event.baseDamage + '点伤害',
						]).set('ai', function () {
							var evt = _status.event.getParent(), player = evt.target, source = evt.player, card = evt.show_card;
							if (get.damageEffect(player, source, player) > 0) return 1;
							if (get.attitude(player, source) * get.value(card, source) >= 0) return 0;
							if (card.name == 'tao') return 1;
							return get.value(card, player) > (6 + (Math.max(player.maxHp, 3) - player.hp) * 1.5) ? 1 : 0;
						});
					}
					else event.finish();
					'step 2'
					if (result.index == 0) player.gain(event.show_card, target, 'give');
					else target.damage();
				},
				ai: {
					basic: {
						order: 9,
						useful: 5,
						value: 7,
					},
					tag: {
						damage: 1,
						loseCard: 1,
						gain: 1,
					},
					result: {
						player: 0.1,
						target: -1.2,
					},
				},
			},
			tuixinzhifu: {
				type: 'trick',
				fullskin: true,
				enable: true,
				filterTarget: function (card, player, target) {
					return target != player && target.countGainableCards(player, 'hej') > 0;
				},
				range: { global: 1 },
				content: function () {
					'step 0'
					player.gainPlayerCard(target, 'hej', true, [1, 2]);
					'step 1'
					if (result.bool && target.isIn()) {
						var num = result.cards.length, hs = player.getCards('h');
						if (!hs.length) event.finish();
						else if (hs.length < num) event._result = { bool: true, cards: hs.length };
						else player.chooseCard('h', true, num, '交给' + get.translation(target) + get.cnNumber(num) + '张牌');
					}
					else event.finish();
					'step 2'
					if (result.bool) target.gain(result.cards, player, 'giveAuto');
				},
				ai: {
					basic: {
						order: 9,
						useful: 2,
						value: 6.6,
					},
					tag: {
						loseCard: 1,
						gain: 0.5,
					},
					result: {
						target: function (player, target) {
							if (get.attitude(player, target) <= 0) return ((target.countCards('he', function (card) {
								return get.value(card, target) > 0 && card != target.getEquip('jinhe');
							}) > 0) ? -0.3 : 0.3) * Math.sqrt(player.countCards('h'));
							return ((target.countCards('ej', function (card) {
								if (get.position(card) == 'e') return get.value(card, target) <= 0;
								var cardj = card.viewAs ? { name: card.viewAs } : card;
								return get.effect(target, cardj, target, player) < 0;
							}) > 0) ? 1.5 : -0.3) * Math.sqrt(player.countCards('h'));
						},
					},
				},
			},
			yitianjian: {
				type: 'equip',
				subtype: 'equip1',
				fullskin: true,
				distance: { attackFrom: -1 },
				skills: ['yitianjian'],
				ai: {
					equipValue: 1.5,
					basic: {
						equipValue: 1.5,
					},
				}
			},
			qixingbaodao: {
				type: 'equip',
				subtype: 'equip1',
				distance: { attackFrom: -1 },
				fullskin: true,
				skills: ['qixingbaodao'],
				selectTarget: [-1, -2],
				ai: {
					order: 9,
					value: function (card, player) {
						if (player.getEquip(1) == card) return 0;
						return 4;
					},
					equipValue: function (card, player) {
						if (player.getCards('e').contains(card)) return 0;
						return -get.value(player.getCards('e'));
					},
					basic: {
						equipValue: 5,
					},
					result: {
						keepAI: true,
						target: function (player, target) {
							var cards = target.getCards('e'), js = target.getCards('j');
							var val = get.value(cards, target);
							for (var card of js) val -= get.effect(target, card.viewAs ? { name: card.viewAs } : card, target, target)
							return -val;
						},
					},
				},
			},
			duanjian: {
				type: 'equip',
				subtype: 'equip1',
				fullskin: true,
				distance: { attackFrom: 1 },
				selectTarget: [-1, -2],
				ai: {
					order: 9,
					equipValue: function (card, player) {
						if (get.position(card) == 'e') return -2;
						return 2;
					},
					value: function (card, player) {
						if (player.getEquip(1) == card) return -3;
						return 3;
					},
					basic: {
						equipValue: 5,
					},
					result: {
						keepAI: true,
						target: function (player, target) {
							var val = 2.5;
							var val2 = 0;
							var card = target.getEquip(1);
							if (card) {
								val2 = get.value(card, target);
								if (val2 < 0) return 0;
							}
							return -val - val2;
						},
					},
				},
			},
			serafuku: {
				type: 'equip',
				subtype: 'equip2',
				fullskin: true,
				//	skills: ['serafuku'],
				skills: ['serafuku_new1', 'serafuku_new2'],
				selectTarget: [-1, -2],
				ai: {
					order: 9,
					equipValue: function (card, player) {
						if (get.position(card) == 'e' && player.hasSex('male')) return -2;
						if (get.position(card) == 'e' && player.hasSex('female')) return 5;
						return 2;
					},
					value: function (card, player) {
						if (player.getEquip(2) == card && player.hasSex('male')) return -3;
						if (player.getEquip(2) == card && player.hasSex('female')) return 5;
						return 3;
					},
					basic: {
						equipValue: 5,
					},
					result: {
						keepAI: true,
						target: function (player, target) {
							var val = (target.hasSex('male') ? 2.5 : -2.5);
							var val2 = 0;
							var card = target.getEquip(1);
							if (card) {
								val2 = get.value(card, target);
								if (val2 < 0) return 0;
							}
							return -val - val2;
						},
					},
				},
			},
			yinfengyi: {
				type: 'equip',
				subtype: 'equip2',
				fullskin: true,
				skills: ['yinfengyi'],
				selectTarget: [-1, -2],
				ai: {
					order: 9,
					equipValue: function (card, player) {
						if (get.position(card) == 'e') return -1;
						return 1;
					},
					value: function (card, player) {
						if (player.getEquip(2) == card) return -2.5;
						return 2.5;
					},
					basic: {
						equipValue: 5,
					},
					result: {
						keepAI: true,
						target: function (player, target) {
							var val = 2;
							var val2 = 0;
							var card = target.getEquip(2);
							if (card) {
								val2 = get.value(card, target);
								if (val2 < 0) return 0;
							}
							return -val - val2;
						},
					},
				},
			},
			yonglv: {
				type: 'equip',
				subtype: 'equip4',
				fullskin: true,
				selectTarget: [-1, -2],
				distance: {
					globalFrom: -1,
					globalTo: -Infinity,
				},
				ai: {
					order: 9,
					equipValue: 0,
					value: function (card, player) {
						if (player.getEquip(2) == card) return 0;
						return 0.5;
					},
					basic: {
						equipValue: 0,
					},
				},
			},
			zhanxiang: {
				type: 'equip',
				subtype: 'equip3',
				fullskin: true,
				distance: { globalTo: 1 },
				skills: ['zhanxiang'],
				ai: {
					equipValue: 3.5,
					basic: {
						equipValue: 3.5,
					},
				}
			},
			xinge: {
				type: 'equip',
				subtype: 'equip5',
				fullskin: true,
				skills: ['xinge'],
				ai: {
					equipValue: 2,
					basic: {
						equipValue: 2,
					},
				}
			},
			muniu: {
				fullskin: true,
				type: 'equip',
				subtype: 'equip5',
				nomod: true,
				onEquip: function () {
					if (card && card.cards && card.cards.length) {
						player.directgains(card.cards, null, 'muniu');
					}
					player.markSkill('muniu_skill');
				},
				forceDie: true,
				onLose: function () {
					delete player.getStat('skill').muniu_skill;
					player.unmarkSkill('muniu_skill');
					if (!card || !card.cards || !card.cards.length) return;
					if ((!event.getParent(2) || event.getParent(2).name != 'swapEquip') && (event.getParent().type != 'equip' || event.getParent().swapEquip)) {
						player.lose(card.cards, ui.discardPile);
						player.$throw(card.cards, 1000);
						player.popup('muniu');
						game.log(card, '掉落了', card.cards);
						card.cards.length = 0;
					}
					else {
						player.lose(card.cards, ui.special);
					}
				},
				clearLose: true,
				equipDelay: false,
				loseDelay: false,
				skills: ['muniu_skill', 'muniu_skill7'],
				ai: {
					equipValue: function (card) {
						if (card.card) return 7 + card.card.length;
						return 7;
					},
					basic: {
						equipValue: 7
					}
				}
			},
			jiu: {
				audio: true,
				fullskin: true,
				type: "basic",
				toself: true,
				delay_prompt: '出牌阶段对一名角色使用，将该牌置入其判定区内。若判定结果不为梅花，生效，其回复1点体力并对自己使用此【酒】。',
				enable: function (event, player) {
					//return !player.hasSkill('jiu');
					return true;
				},
				lianheng: true,
				logv: false,
				savable: function (card, player, dying) {
					return dying == player || player.hasSkillTag('jiuOther', null, dying, true);
				},
				usable: 1,
				selectTarget: -1,
				modTarget: true,
				filterTarget: function (card, player, target) {
					return target == player;
				},
				content: function () {
					if (typeof event.baseDamage != 'number') event.baseDamage = 1;
					if (target.isDying() || event.getParent(2).type == 'dying') {
						target.recover(event.baseDamage);
						if (_status.currentPhase == target) {
							target.getStat().card.jiu--;
						}
					}
					else {
						game.addVideo('jiuNode', target, true);
						if (cards && cards.length) {
							card = cards[0];
						}
						if (!target.storage.jiu) target.storage.jiu = 0;
						target.storage.jiu += event.baseDamage;
						game.broadcastAll(function (target, card, gain2) {
							target.addSkill('jiu');
							if (!target.node.jiu && lib.config.jiu_effect) {
								target.node.jiu = ui.create.div('.playerjiu', target.node.avatar);
								target.node.jiu2 = ui.create.div('.playerjiu', target.node.avatar2);
							}
							if (gain2 && card.clone && (card.clone.parentNode == target.parentNode || card.clone.parentNode == ui.arena)) {
								card.clone.moveDelete(target);
							}
						}, target, card, target == targets[0] && cards.length == 1);
						if (target == targets[0] && cards.length == 1) {
							if (card.clone && (card.clone.parentNode == target.parentNode || card.clone.parentNode == ui.arena)) {
								game.addVideo('gain2', target, get.cardsInfo([card]));
							}
						}
					}
				},
				ai: {
					basic: {
						useful: function (card, i) {
							if (_status.event.player.hp > 1) {
								if (i == 0) return 4;
								return 1;
							}
							if (i == 0) return 7.3;
							return 3;
						},
						value: function (card, player, i) {
							if (player.hp > 1) {
								if (i == 0) return 5;
								return 1;
							}
							if (i == 0) return 7.3;
							return 3;
						},
					},
					order: function () {
						return get.order({ name: 'sha' }) + 0.2;
					},
					result: {
						target: function (player, target) {
							if (target && target.isDying()) return 2;
							if (target && !target.isPhaseUsing()) return 0;
							if (lib.config.mode == 'stone' && !player.isMin()) {
								if (player.getActCount() + 1 >= player.actcount) return 0;
							}
							var shas = player.getCards('h', 'sha');
							if (shas.length > 1 && (player.getCardUsable('sha') > 1 || player.countCards('h', 'zhuge'))) {
								return 0;
							}
							shas.sort(function (a, b) {
								return get.order(b) - get.order(a);
							})
							var card;
							if (shas.length) {
								for (var i = 0; i < shas.length; i++) {
									if (lib.filter.filterCard(shas[i], target)) {
										card = shas[i]; break;
									}
								}
							}
							else if (player.hasSha() && player.needsToDiscard()) {
								if (player.countCards('h', 'hufu') != 1) {
									card = { name: 'sha' };
								}
							}
							if (card) {
								if (game.hasPlayer(function (current) {
									return (get.attitude(target, current) < 0 &&
										target.canUse(card, current, true, true) &&
										!current.hasSkillTag('filterDamage', null, {
											player: player,
											card: card,
											jiu: true,
										}) &&
										get.effect(current, card, target) > 0);
								})) {
									return 1;
								}
							}
							return 0;
						},
					},
					tag: {
						save: 1
					}
				}
			},
			huogong: {
				audio: true,
				fullskin: true,
				type: 'trick',
				enable: true,
				delay_prompt: '出牌阶段对一名角色使用，将该牌置入其判定区内。其弃置一张与判定牌颜色相同的牌，否则受到1点火焰伤害。',
				//cardnature:'fire',
				filterTarget: function (card, player, target) {
					if (player != game.me && player.countCards('h') < 2) return false;
					return target.countCards('h') > 0;
				},
				content: function () {
					"step 0"
					if (target.countCards('h') == 0) {
						event.finish();
						return;
					}
					target.chooseCard(true).ai = function (card) {
						if (_status.event.getRand() < 0.5) return Math.random();
						return get.value(card);
					};
					"step 1"
					event.dialog = ui.create.dialog(get.translation(target) + '展示的手牌', result.cards);
					event.videoId = lib.status.videoId++;

					game.broadcast('createDialog', event.videoId, get.translation(target) + '展示的手牌', result.cards);
					game.addVideo('cardDialog', null, [get.translation(target) + '展示的手牌', get.cardsInfo(result.cards), event.videoId]);
					event.card2 = result.cards[0];
					game.log(target, '展示了', event.card2);
					event._result = {};
					player.chooseToDiscard({ suit: get.suit(event.card2) }, function (card) {
						var evt = _status.event.getParent();
						if (get.damageEffect(evt.target, evt.player, evt.player, 'fire') > 0) {
							return 7 - get.value(card, evt.player);
						}
						return -1;
					}).set('prompt', false);
					game.delay(2);
					"step 2"
					if (result.bool) {
						target.damage('fire', event.baseDamage || 1);
					}
					else {
						target.addTempSkill('huogong2');
					}
					event.dialog.close();
					game.addVideo('cardDialog', null, event.videoId);
					game.broadcast('closeDialog', event.videoId);
				},
				ai: {
					basic: {
						order: 4,
						value: [3, 1],
						useful: 1,
					},
					wuxie: function (target, card, player, current, state) {
						if (get.attitude(current, player) >= 0 && state > 0) return false;
					},
					result: {
						player: function (player) {
							var nh = player.countCards('h');
							if (nh <= player.hp && nh <= 4 && _status.event.name == 'chooseToUse') {
								if (typeof _status.event.filterCard == 'function' &&
									_status.event.filterCard({ name: 'huogong' }, player, _status.event)) {
									return -10;
								}
								if (_status.event.skill) {
									var viewAs = get.info(_status.event.skill).viewAs;
									if (viewAs == 'huogong') return -10;
									if (viewAs && viewAs.name == 'huogong') return -10;
								}
							}
							return 0;
						},
						target: function (player, target) {
							if (target.hasSkill('huogong2') || target.countCards('h') == 0) return 0;
							if (player.countCards('h') <= 1) return 0;
							if (target == player) {
								if (typeof _status.event.filterCard == 'function' &&
									_status.event.filterCard({ name: 'huogong' }, player, _status.event)) {
									return -1.5;
								}
								if (_status.event.skill) {
									var viewAs = get.info(_status.event.skill).viewAs;
									if (viewAs == 'huogong') return -1.5;
									if (viewAs && viewAs.name == 'huogong') return -1.5;
								}
								return 0;
							}
							return -1.5;
						}
					},
					tag: {
						damage: 1,
						fireDamage: 1,
						natureDamage: 1,
						norepeat: 1
					}
				}
			},
			tiesuo: {
				audio: true,
				fullskin: true,
				type: 'trick',
				enable: true,
				filterTarget: true,
				selectTarget: [1, 2],
				complexTarget: true,
				content: function () {
					target.link();
				},
				chongzhu: true,
				ai: {
					wuxie: function (target, card, player, viewer) {
						if (_status.event.getRand() < 0.5) return 0;
						if (player == game.me && get.attitude(viewer, player) > 0) {
							return 0;
						}
					},
					basic: {
						useful: 4,
						value: 4,
						order: 7
					},
					result: {
						target: function (player, target) {
							if (target.isLinked()) {
								if (target.hasSkillTag('link')) return 0;
								var f = target.hasSkillTag('nofire');
								var t = target.hasSkillTag('nothunder');
								if (f && t) return 0;
								if (f || t) return 0.5;
								return 2;
							}
							if (get.attitude(player, target) >= 0) return -0.9;
							if (ui.selected.targets.length) return -0.9;
							if (game.hasPlayer(function (current) {
								return get.attitude(player, current) <= -1 && current != target && !current.isLinked();
							})) {
								return -0.9;
							}
							return 0;
						}
					},
					tag: {
						multitarget: 1,
						multineg: 1,
						norepeat: 1
					}
				}
			},
			bingliang: {
				audio: true,
				fullskin: true,
				type: 'delay',
				range: { global: 1 },
				filterTarget: function (card, player, target) {
					return (lib.filter.judge(card, player, target) && player != target);
				},
				judge: function (card) {
					if (get.suit(card) == 'club') return 1;
					return -2;
				},
				judge2: function (result) {
					if (result.bool == false) return true;
					return false;
				},
				effect: function () {
					if (result.bool == false) {
						if (get.is.changban()) player.addTempSkill('bingliang_changban');
						else player.skip('phaseDraw');
					}
				},
				ai: {
					basic: {
						order: 1,
						useful: 1,
						value: 4,
					},
					result: {
						target: function (player, target) {
							if (target.hasJudge('caomu')) return 0;
							return -1.5 / Math.sqrt(target.countCards('h') + 1);
						}
					},
					tag: {
						delay: 'bad',
						skip: 'phaseDraw'
					}
				}
			},
			hualiu: {
				fullskin: true,
				type: 'equip',
				subtype: 'equip3',
				distance: { globalTo: 1 },
			},
			zhuque: {
				fullskin: true,
				type: 'equip',
				subtype: 'equip1',
				//cardnature:'fire',
				distance: { attackFrom: -3 },
				ai: {
					basic: {
						equipValue: 2
					}
				},
				skills: ['zhuque_skill']
			},
			guding: {
				fullskin: true,
				type: 'equip',
				subtype: 'equip1',
				distance: { attackFrom: -1 },
				ai: {
					basic: {
						equipValue: 2
					}
				},
				skills: ['guding_skill']
			},
			tengjia: {
				fullskin: true,
				type: 'equip',
				subtype: 'equip2',
				//cardnature:'fire',
				ai: {
					value: function (card, player, index, method) {
						if (player.isDisabled(2)) return 0.01;
						if (card == player.getEquip(2)) {
							if (player.hasSkillTag('noDirectDamage')) return 10;
							if (game.hasPlayer(function (current) {
								return current != player && get.attitude(current, player) < 0 && current.hasSkillTag('fireAttack', null, null, true);
							})) return 0;
							return 6;
						}
						var value = 0;
						var info = get.info(card);
						var current = player.getEquip(info.subtype);
						if (current && card != current) {
							value = get.value(current, player);
						}
						var equipValue = info.ai.equipValue;
						if (equipValue == undefined) {
							equipValue = info.ai.basic.equipValue;
						}
						if (typeof equipValue == 'function') {
							if (method == 'raw') return equipValue(card, player);
							if (method == 'raw2') return equipValue(card, player) - value;
							return Math.max(0.1, equipValue(card, player) - value);
						}
						if (typeof equipValue != 'number') equipValue = 0;
						if (method == 'raw') return equipValue;
						if (method == 'raw2') return equipValue - value;
						return Math.max(0.1, equipValue - value);
					},
					equipValue: function (card, player) {
						if (player.hasSkillTag('maixie') && player.hp > 1) return 0;
						if (player.hasSkillTag('noDirectDamage')) return 10;
						if (get.damageEffect(player, player, player, 'fire') >= 0) return 10;
						var num = 4 - game.countPlayer(function (current) {
							if (get.attitude(current, player) < 0) {
								if (current.hasSkillTag('fireAttack', null, null, true)) return 3;
								return 1;
							}
							return false;
						});
						if (player.hp == 1) num += 3;
						if (player.hp == 2) num += 1;
						return num;
					},
					basic: {
						equipValue: 3
					},
				},
				skills: ['tengjia_new', 'tengjia2']
				//	skills: ['tengjia1', 'tengjia2', 'tengjia3']
			},
			baiyin: {
				fullskin: true,
				type: 'equip',
				subtype: 'equip2',
				loseDelay: false,
				onLose: function () {
					var next = game.createEvent('baiyin_recover');
					event.next.remove(next);
					var evt = event.getParent();
					if (evt.getlx === false) evt = evt.getParent();
					evt.after.push(next);
					next.player = player;
					next.setContent(function () {
						if (player.isDamaged()) player.logSkill('baiyin_skill');
						player.recover();
					});
				},
				filterLose: function (card, player) {
					if (player.hasSkillTag('unequip2')) return false;
					return true;
				},
				skills: ['baiyin_skill'],
				tag: {
					recover: 1,
				},
				ai: {
					order: 9.5,
					equipValue: function (card, player) {
						if (player.hp == player.maxHp) return 5;
						if (player.countCards('h', 'baiyin')) return 6;
						return 0;
					},
					basic: {
						equipValue: 5
					}
				}
			},
			//delayCard
			"guohe_delay": {
				audio: "guohe",
				fullskin: true,
				isdelay: true,
				type: 'delay',
				istype: 'trick',
				filterTarget: function (card, player, target) {
					return (lib.filter.judge(card, player, target) && player != target);
				},
				judge: function (card) {
					if (get.number(card) > 3) return -2;
					return 1;
				},
				judge2: function (result) {
					if (result.bool == false) return true;
					return false;
				},
				effect: function () {
					'step 0'
					var target = player;
					player = card.source;
					if (result.bool == true) {
						event.finish();
					}
					else {

						if (!get.is.single()) {
							if (!game.hasDead(function (current) {
								if (player != current) return false;
								return true;
							})) {
								if (target.countDiscardableCards(player, 'h'))
									player.discardPlayerCard('h', target);
								if (target.countDiscardableCards(player, 'e'))
									player.discardPlayerCard('e', target);
								if (target.countDiscardableCards(player, 'j'))
									player.discardPlayerCard('j', target);
							}
							else {
								if (target.countDiscardableCards(player, 'h'))
									target.discardPlayerCard('h', target, true);
								if (target.countDiscardableCards(player, 'e'))
									target.discardPlayerCard('e', target, true);
								if (target.countDiscardableCards(player, 'j'))
									target.discardPlayerCard('j', target, true);
							}

							event.finish();
						}
						else {

							//1v1模式暂时没有实装
							var bool1 = target.countDiscardableCards(player, 'h');
							var bool2 = target.countDiscardableCards(player, 'e');
							if (bool1 && bool2) {
								player.chooseControl('手牌区', '装备区').set('ai', function () {
									return Math.random() < 0.5 ? 1 : 0;
								}).set('prompt', '弃置' + (get.translation(target)) + '装备区的一张牌，或观看其手牌并弃置其中的一张牌。');
							}
							else event._result = { control: bool1 ? '手牌区' : '装备区' };
						}
					}
					'step 1'
					var pos = result.control == '手牌区' ? 'h' : 'e';
					player.discardPlayerCard(target, pos, true, 'visible');
				},
				ai: {
					basic: {
						order: 5,
						useful: 1,
						value: 8,
					},
					result: {
						target: function (player, target) {
							if (target.countCards('j', { name: 'guohe_delay' })) return false;
							var att = get.attitude(player, target);
							var nh = target.countCards('h');
							if (att > 0) {
								if (target.countCards('j', function (card) {
									var cardj = card.viewAs ? { name: card.viewAs } : card;
									if (target.hasSkill('dahuo') && target.countCards('j') == 1) return -2;
									if (get.tag(cardj, 'delay') == 'good') return false;
									return get.effect(target, cardj, target, player) < 0;
								}) > 0) return 3;
								if (target.getEquip('baiyin') && target.isDamaged() &&
									get.recoverEffect(target, player, player) > 0) {
									if (target.hp == 1 && !target.hujia) return 1.6;
								}
								if (target.countCards('e', function (card) {
									if (get.position(card) == 'e') return get.value(card, target) < 0;
								}) > 0) return 1;
							}
							var es = target.getCards('e');
							var noe = (es.length == 0 || target.hasSkillTag('noe'));
							var noe2 = (es.filter(function (esx) {
								return get.value(esx, target) > 0;
							}).length == 0);
							var noh = (nh == 0 || target.hasSkillTag('noh'));
							if (noh && (noe || noe2)) return 0;
							if (att <= 0) {
								if (target.countCards('j', function (card) {
									var cardj = card.viewAs ? { name: card.viewAs } : card;
									if (target.hasSkill('dahuo') && target.countCards('j') == 1) return 2;
									if (get.tag(cardj, 'delay') == 'bad') return false;
									return get.effect(target, cardj, target, player) > 0;
								}) > 0) return 3;
								if (!target.countCards('he'))
									return 1.5;
							}
							return -1.5;
						},
					},
					tag: {
						delay: 'bad',
						loseCard: 3,
						discard: 3
					}
				}
			},
			"shunshou_delay": {
				audio: "shunshou",
				fullskin: true,
				isdelay: true,
				type: 'delay',
				istype: 'trick',
				range: { global: 1 },
				filterTarget: function (card, player, target) {
					return (lib.filter.judge(card, player, target) && player != target);
				},
				judge: function (card) {
					if (get.number(card) < 11) return -2;
					return 1;
				},
				judge2: function (result) {
					if (result.bool == false) return true;
					return false;
				},
				effect: function () {
					var target = player;
					player = card.source;
					if (result.bool == true) {
						event.finish();
					}
					else {
						if (!game.hasDead(function (current) {
							if (player != current) return false;
							return true;
						})) {
							if (target.countGainableCards('hej') > 0)
								player.moveTargetCard(target);
						}
						else {
							if (target.countDiscardableCards(player, 'h'))
								target.discardPlayerCard('h', target, true);
							if (target.countDiscardableCards(player, 'e'))
								target.discardPlayerCard('e', target, true);
							if (target.countDiscardableCards(player, 'j'))
								target.discardPlayerCard('j', target, true);
						}

					}
				},
				ai: {
					basic: {
						order: 7.5,
						useful: 4,
						value: 9.2
					},
					result: {
						target: function (player, target) {
							if (target.countCards('j', { name: 'shunshou_delay' })) return false;
							if (get.attitude(player, target) <= 0) return (target.countCards('he', function (card) {
								return get.value(card, target) > 0 && card != target.getEquip('jinhe');
							}) > 0) ? -1.5 : 1.5;
							return (target.countCards('ej', function (card) {
								if (get.position(card) == 'e') return get.value(card, target) <= 0;
								var cardj = card.viewAs ? { name: card.viewAs } : card;
								return get.effect(target, cardj, target, player) < 0;
							}) > 0) ? 1.5 : -1.5;
						},
						player: function (player, target) {
							if (target.countCards('j', { name: 'shunshou_delay' })) return false;
							if (get.attitude(player, target) < 0 && !target.countCards('he', function (card) {
								return get.value(card, target) > 0 && card != target.getEquip('jinhe');
							})) {
								return 0;
							}
							if (get.attitude(player, target) > 1) {
								return (target.countCards('ej', function (card) {
									if (get.position(card) == 'e') return get.value(card, target) <= 0;
									var cardj = card.viewAs ? { name: card.viewAs } : card;
									return get.effect(target, cardj, target, player) < 0;
								}) > 0) ? 1.5 : -1.5;
							}
							return 1;
						}
					},
					tag: {
						delay: 'bad',
						loseCard: 1,
						gain: 1,
					}
				}
			},
			"manzu_delay": {
				audio: "manzu",
				fullskin: true,
				isdelay: true,
				type: 'delay',
				istype: 'trick',
				filterTarget: function (card, player, target) {
					return (lib.filter.judge(card, player, target));
				},
				judge: function (card) {
					if (get.suit(card) != 'spade') return 1;
					return -2;
				},
				judge2: function (result) {
					if (result.bool == false) return false;
					return true;
				},
				effect: function () {
					'step 0'
					if (result.bool == false) {
						event.finish();
					}
					else {
						player.chooseControl().set('choiceList', [
							'摸四张牌，然后弃置两张牌',
							'摸三张牌，至少交给其他角色一张牌'
						]).set('ai', function () {
							var evt = _status.event.getParent(), player = evt.player;
							if (game.hasPlayer(function (current) {
								if (get.attitude(player, current) <= 0) return false;
								return get.attitude(player, current) * (current.maxHp + 1 - current.hp) * (current.maxHp - current.countCards('h')) > 3;
							})) return 1;
							return 0;
						});

					}
					'step 1'
					if (result.index == 0) {
						player.draw(4);
						player.chooseToDiscard(2, true, 'he');
						event.finish();
					}
					else {
						player.draw(3);
						player.chooseCardTarget({
							selectCard: [1, Infinity],
							prompt: '交给其他角色至少一张牌',
							forced: true,
							ai1: function (card) {
								if (ui.selected.cards.length >= player.countCards('h') / 2.5 && ui.selected.cards.length >= 1) return -1;
								if (get.value(card, _status.event.player) > 5) return 6.6 - get.value(card, _status.event.player);
								if (!ui.selected.cards.length) return true;
								return get.value(card, _status.event.player)-2;
							},
							ai2: function (target) {
								if (get.attitude(_status.event.player, target) < 0) return -1;
								return get.attitude(_status.event.player, target) * (target.maxHp + 1 - target.hp) * (target.maxHp - target.countCards('h'))>3;
							}
						});

					}
					'step 2'
					if (result.targets && result.targets[0]) {
						result.targets[0].gain(result.cards, player, 'giveAuto');
					}
				},
				ai: {
					basic: {
						order: 7.2,
						useful: 4.5,
						value: 9.5
					},
					tag: {
						delay: 'good',
						draw: 3,
					},
					result: {
						target: 3,
					},
				},
			},
			"guagu_delay": {
				audio: "guaguliaodu",
				fullskin: true,
				isdelay: true,
				type: 'delay',
				istype: 'trick',
				filterTarget: function (card, player, target) {
					return (lib.filter.judge(card, player, target));
				},
				judge: function (card) {
					if (get.color(card) == 'red') {
						_status.currentjudger.storage._guagu_delay = true;
					}
					return 1;
				},
				judge2: function (result) {
					if (result.bool == false) return false;
					return true;
				},
				effect: function () {
					if (result.bool == false) {
						event.finish();
					}
					else {
						player.recover();
						if (player.hasCard(function (card) {
							return _status.connectMode || get.name(card, player) == 'du';
						}, 'h')) player.chooseToDiscard(player.countCards('h', 'du'), 'h', { name: 'du' }, '是否弃置所有【毒】？（不失去体力）').set('ai', () => 1);
						if (player.storage._guagu_delay) {
							player.draw();
							delete player.storage._guagu_delay;
						}

					}
				},
				ai: {
					basic: {
						order: 8,
						useful: 4,
						value: 7.4
					},
					result: {
						target: function (player, target) {
							if (target.hp == target.maxHp) return 0.5;
							if (target.hp != target.maxHp) return 3;
							if (target.hp == 1) return 5;
						},
					},
					tag: {
						delay: 'good',
						recover: 1,
						draw: 1,
						save: 1,
					}
				}
			},
			"sha_delay": {
				audio: "sha",
				nature: ['thunder', 'fire', 'ice', 'stab'],
				range: { attack: 1 },
				usable: 1,
				fullskin: true,
				isdelay: true,
				type: 'delay',
				istype: 'basic',
				filterTarget: function (card, player, target) {
					return (lib.filter.judge(card, player, target) && player != target);
				},
				judge: function (card) {
					var cardnow = _status.currentjudge;
					if (get.suit(card) != get.suit(cardnow)) return -2;
					return 1;
				},
				judge2: function (result) {
					if (result.bool == false) return true;
					return false;
				},
				effect: function () {
					"step 0"
					var target = player;
					player = card.source;
					if (result.bool == true) {
						event.finish();
					}
					else {
						if (!game.hasDead(function (current) {
							if (player != current) return false;
							return true;
						})) {
							var card = event.card;
							player.storage._shaeffect_delay = get.getcardtag(card);
							var cardtag = get.getcardtag(card) || 'delay';
							if (player.canUse({ name: 'sha' }, target)) {
								//	player.useCard({ name: 'sha', nature: card.nature, suit: card.suit, number: card.number, storage: cardtag },false, target, cards);
								player.chooseUseTarget({ name: 'sha', nature: card.nature, suit: card.suit, number: card.number, storage: cardtag, type: 'basic' }, [card], true, target, false, 'noTargetDelay', 'nodelayx', 'nodistance');
							}
						}
						else {
							if (event.directHit) event._result = { bool: false };
							else {

								var next = target.chooseToRespond({ name: 'shan' });
								next.set('ai', function (card) {
									var evt = _status.event.getParent();
									if (get.damageEffect(evt.player) >= 0) return 0;
									if (evt.player.hasSkillTag('notrick')) return 0;
									if (evt.player.hasSkillTag('noShan')) {
										return -1;
									}
									return get.order(card);
								});
								next.autochoose = lib.filter.autoRespondShan;
							}

						}
					}
					"step 1"
					if (result.bool == false) {
						player.damage(1, event.card.nature, "nosource", event.card);
					}
				},
				ai: {
					basic: {
						order: 9,
						useful: 2,
						value: 4
					},
					tag: {
						delay: 'bad',
						damage: 1,
						natureDamage: function (card) {
							if (card.nature) return 1;
						},
						fireDamage: function (card, nature) {
							if (card.nature == 'fire') return 1;
						},
						thunderDamage: function (card, nature) {
							if (card.nature == 'thunder') return 1;
						},
					},
					result: {
						target: function (player, target, card, isLink) {
							var eff = function () {
								if (!isLink && player.hasSkill('jiu')) {
									if (!target.hasSkillTag('filterDamage', null, {
										player: player,
										card: card,
										jiu: true,
									})) {
										if (get.attitude(player, target) > 0) {
											return -7;
										}
										else {
											return -4;
										}
									}
									return -0.5;
								}
								return -1.5;
							}();
							if (!isLink && target.mayHaveShan() && !player.hasSkillTag('directHit_ai', true, {
								target: target,
								card: card,
							}, true)) return eff / 1.2;
							return eff;
						},
					}
				}
			},
			"tao_delay": {
				audio: "tao",
				fullskin: true,
				isdelay: true,
				type: 'delay',
				istype: 'basic',
				filterTarget: function (card, player, target) {
					return (lib.filter.judge(card, player, target));
				},
				judge: function (card) {
					if (get.color(card) == 'red') {
						_status.currentjudger.storage._tao_delay = true;
					}
					return 1;
				},
				judge2: function (result) {
					if (result.bool == false) return false;
					return true;
				},
				effect: function () {
					if (result.bool == false) {
						event.finish();
					}
					else {
						var card = event.card;
						player.recover(1, card.nature);
						//	player.useCard({ name: 'tao', nature: card.nature, suit: card.suit, number: card.number }, target, cards);
						//	player.chooseUseTarget({ name: 'tao', nature: card.nature, suit: card.suit, number: card.number }, true, 'noTargetDelay', 'nodelayx');
						if (player.storage._tao_delay) {
							player.draw();
							delete player.storage._tao_delay;
						}
					}
				},
				tag: {
					basic: {
						order: 8,
						useful: 4,
						value: 7.2
					},
					result: {
						target: function (player, target) {
							if (target.hp == target.maxHp) return 0.5;
							if (target.hp != target.maxHp) return 3;
							if (target.hp == 1) return 5;
						},
					},
					tag: {
						delay: 'good',
						recover: 1,
						draw: 1,
						save: 1,
					}

				}
			},
			"jiu_delay": {
				audio: "jiu",
				fullskin: true,
				isdelay: true,
				type: 'delay',
				istype: 'basic',
				filterTarget: function (card, player, target) {
					return (lib.filter.judge(card, player, target));
				},
				judge: function (card) {
					if (get.suit(card) != 'club') return 1;
					return -2;
				},
				judge2: function (result) {
					if (result.bool == false) return false;
					return true;
				},
				effect: function () {
					if (result.bool == false) {
						event.finish();
					}
					else {
						'step 0'
						player.recover();
						'step 1'
						var card = event.card;
						player.chooseUseTarget({ name: 'jiu', suit: card.suit, number: card.number, type: 'basic' }, [card], true, 'noTargetDelay', 'nodelayx');
					}
				},
				ai: {
					basic: {
						order: 8,
						useful: 4,
						value: 6
					},
					result: {
						target: function (player, target) {
							if (target.hp == 1) return 5;
							else return 1;
						},
					},
					tag: {
						delay: 'good',
						save: 1,
					}
				}
			},
			"huogong_delay": {
				audio: "huogong",
				fullskin: true,
				isdelay: true,
				type: 'delay',
				istype: 'trick',
				filterTarget: function (card, player, target) {
					return (lib.filter.judge(card, player, target));
				},
				judge: function (card) {
					_status.currentjudger.storage._huogong_delay_card = get.color(card);
					return -2;
				},
				judge2: function (result) {
					if (result.bool == false) return true;
					return false;
				},
				effect: function () {
					'step 0'
					var card = _status.event.player.storage._huogong_delay_card;
					event.target = event.card.source;
					delete _status.event.player.storage._huogong_delay_card;
					if (result.bool == true) {
						event.finish();
					}
					else {
						player.chooseToDiscard({ color: card }, function (card) {
							var evt = _status.event.getParent();
							evt.target = _status.event.player.storage._huogong_delay;
							if (get.damageEffect(evt.player, evt.target, evt.player, 'fire') < 0) {
								return 7 - get.value(card, evt.player);
							}
							return -1;
						}).set('prompt', '弃置一张与判定牌颜色相同的牌，否则受到1点火焰伤害');
					}

					'step 1'
					if (!result.bool) {
						player.damage('fire', event.baseDamage || 1, event.target);
					}
				},
				ai: {
					basic: {
						order: 8,
						useful: 2,
						value: 6.5
					},
					result: {
						target: function (player, target) {
							if (target.countCards('h') == 0) return -2;
							return -1.5;
						}
					},
					tag: {
						delay: 'bad',
						damage: 1,
						fireDamage: 1,
						natureDamage: 1,
						norepeat: 1
					}
				}
			},
			'caiming_delay': {
				audio: 'caiming',
				fullskin: true,
				isdelay: true,
				type: 'delay',
				istype: 'trick',
				judge: function (card) {
					_status.currentjudger.storage._caiming_delay_card = get.number(card);

					return -2;
				},
				judge2: function (result) {
					if (result.bool == false) return true;
					return false;
				},
				filterTarget: function (card, player, target) {
					return (lib.filter.judge(card, player, target));
				},
				effect: function () {
					'step 0'
					event.num = _status.event.player.storage._caiming_delay_card;
					event.nownum = 0;
					event.target = card.source;
					'step 1'
					event.prompt = '当前字数为：' + event.nownum + '判定牌的点数是：' + event.num, '是否选择这张牌？';
					var rand = Math.round(Math.random() * (5 - 1) + 1);
					event.word = '';
					if (rand == 1) event.word = 'Gsusu';
					else if (rand == 2) event.word = 'Gmangzhong';
					else if (rand == 3) event.word = 'Gdaben';
					else if (rand == 4) event.word = 'Gyunyan';
					else if (rand == 5) event.word = 'Ghongse';
					player.chooseButton([event.prompt, [[event.word], 'vcard']], function (button) {
						if (event.nownum >= event.num) return false;
						if ((14 - event.nownum >> 1) < 2) return false;
						return true;
					});
					'step 2'
					if (result.bool) {
						if (result.links[0][2] == 'Gsusu') event.nownum += 1;
						else if (result.links[0][2] == 'Gmangzhong') event.nownum += 2;
						else if (result.links[0][2] == 'Gdaben') event.nownum += 3;
						else if (result.links[0][2] == 'Gyunyan') event.nownum += 4;
						else if (result.links[0][2] == 'Ghongse') event.nownum += 5;
						if (event.nownum > 13)
							event.goto(3);
						else
							event.goto(1);
					}
					else {
						if (event.nownum >= event.num) {
							event.goto(4);
						}
						else {
							event.goto(3);
						}
					}
					'step 3'
					var num = 1;
					if (event.nownum > 13) num++;
					player.damage(num, 'thunder', event.target);
					'step 4'
					game.log('#b' + get.translation(player.name), "最后的字数是", '#g' + event.nownum);
					delete _status.event.player.storage._caiming_delay;
					game.delayx();
				},
				ai: {
					basic: {
						order: 8,
						useful: 2,
						value: 5.6
					},
					result: {
						target: -1.5,
					},
					tag: {
						delay: 'bad',
						damage: 1,
						thunderDamage: 1,
						natureDamage: 1,
					}
				}
			},
			pengran_delay: {
				audio: "pengran",
				fullskin: true,
				isdelay: true,
				type: 'delay',
				istype: 'trick',
				filterTarget: function (card, player, target) {
					return (lib.filter.judge(card, player, target)) && player != target;
				},
				judge: function (card) {
					_status.currentjudger.storage._pengran_delay_card = get.number(card);
					return -2;
				},
				judge2: function (result) {
					if (result.bool == false) return true;
					return false;
				},
				effect: function () {
					'step 0'
					event.nowNumber = _status.event.player.storage._pengran_delay_card;
					event.target = event.card.source;
					delete _status.event.player.storage._pengran_delay_card;
					if (result.bool == true) {
						event.finish();
					}
					else {
						player.chooseToDiscard(function (card) {
							var evt = _status.event.getParent();
							evt.target = event.card.source;
							if (get.damageEffect(evt.player, evt.target, evt.player) < 0) {
								return 7 - get.value(card, evt.player);
							}
							return -1;
						}).set('prompt', '弃置一张大于判定牌点数的牌，否则受到1点自适应伤害').set('filterCard', function (card) {
							var evt = _status.event.getParent();
							return evt.nowNumber < get.number(card);
						});
					}

					'step 1'
					if (result.bool) {
						//	if (!game.hasDead(function (current) {
						//		if (event.target != current) return false;
						//		return true;
						//	}))
						//		event.target.draw();
					}
					else {
						player.autoDamage(event.baseDamage || 1, event.target);
					}
				},
				ai: {
					basic: {
						order: 8,
						useful: 2,
						value: 6.5
					},
					result: {
						target: function (player, target) {
							if (target.countCards('h') == 0) return -2;
							return -1.5;
						}
					},
					tag: {
						delay: 'bad',
						damage: 1,
						natureDamage: 1,
						draw: 1,
					}
				}
			},
			//newCardfor A-SOUL
			'huizhe': {
				audio: "huizhe",
				fullskin: true,
				wuxieable: true,
				type: 'trick',
				enable: true,
				chongzhu: true,
				selectTarget: 1,
				filterTarget: function (card, player, target) {
					if (_status.canHuizhe) return target == _status.canHuizhe;
					if (target.getCanhuizhecards() > 0) return true;
					return false;
				},
				content: function () {
					'step 0'
					if (_status.canHuizhe) {
						_status.huizhe = true;
						event.finish();
					}
					else {
						player.choosePlayerCard('j', get.prompt('huizhe'), true, target).set('ai', function (button) {
							var card = button.link;
							var att = get.attitude(player, target);
							if (att > 0) {
								if (get.tag(card, 'delay') == 'good') return get.value(card);
							}
							if (att < 0) {
								if (get.effect(target, card, target, player) > 0) return get.value(card);
							}
							return false;
						}).set('filterButton', function (button) {
							var target = event.target;
							var card = button.link;
							var name = card.viewAs || card.name;
							if (get.info({ name: name }).isdelay != true) return false;
							if ((name == 'tao_delay' || name == 'guagu_delay') && target.hp == target.maxHp) return false;
							return true;
						});
					}

					'step 1'
					if (result.bool) {
						event.target.phaseJudge(result.links[0]).set('nocancel', true);
					}
				},
				ai: {
					wuxie: function (target, card, player, current, state) {
						if (get.attitude(current, player) >= 0 && state > 0) return false;
					},
					basic: {
						order: 3,
						useful: [5.8, 3.9, 3],
						value: [5.8, 3.9, 3],
					},
					result: {
						target: function (player, target) {
							var att = get.attitude(player, target);
							if (_status.canHuizhe) {
								return 3;
							}
							else {
								if (att > 0) {
									if (target.countCards('j', function (card) {
										var cardj = card.viewAs ? { name: card.viewAs } : card;
										if (get.tag(cardj, 'delay') == 'good') return true;
										return false;
									}) > 0) return 3;
								}
								if (att < 0) {
									if (target.countCards('j', function (card) {
										var cardj = card.viewAs ? { name: card.viewAs } : card;
										return get.effect(target, cardj, target, player) > 0;
									}) > 0) return -3;
								}
							}
							return 0;
						}
					},
				}
			},
			'menghun': {
				audio: "menghun",
				fullskin: true,
				type: 'trick',
				notarget: true,
				chongzhu: true,
				nodelay: true,
				wuxieable: true,
				content: function () {
					_status.menghun = true;
					game.delay(0.5);
				},
				ai: {
					wuxie: function (target, card, player, current, state) {
						if (get.attitude(current, player) >= 0 && state > 0) return -1;
					},
					order: 3,
					basic: {
						useful: [4, 4.5, 2],
						value: [4, 4.5, 2],
					},
					result: { player: 1 },
					//expose:0.2
				}
			},
			'shebei': {
				audio: "shebei",
				fullskin: true,
				type: 'trick',
				enable: true,
				selectTarget: 1,
				filterTarget: function (card, player, target) {
					return target.countCards('hej') > 0;
				},
				content: function () {
					'step 0'
					player.discardPlayerCard('hej', target, true);
					'step 1'
					target.draw();
				},
				ai: {
					wuxie: function (target, card, player, current, state) {
						if (get.attitude(current, player) >= 0 && state > 0) return -1;
					},
					basic: {
						order: 9,
						useful: 5,
						value: 4,
					},
					result: {
						target: function (player, target) {
							var att = get.attitude(player, target);
							var nh = target.countCards('h');
							if (att > 0 || player == target) {
								if (target.countCards('j', function (card) {
									var cardj = card.viewAs ? { name: card.viewAs } : card;
									if (get.tag(cardj, 'delay') == 'good') return false;
									return get.effect(target, cardj, target, player) < 0;
								}) > 0) return 3;
								if (target.getEquip('baiyin') && target.isDamaged() &&
									get.recoverEffect(target, player, player) > 0) {
									if (target.hp == 1 && !target.hujia) return 1.6;
								}
								if (target.countCards('e', function (card) {
									if (get.position(card) == 'e') return get.value(card, target) < 0;
								}) > 0) return 1;
							}
							var es = target.getCards('e');
							var noe = (es.length == 0 || target.hasSkillTag('noe'));
							var noe2 = (es.filter(function (esx) {
								return get.value(esx, target) > 0;
							}).length == 0);
							var noh = (nh == 0 || target.hasSkillTag('noh'));
							if (noh && (noe || noe2)) return 0;
							if (att <= 0) {
								if (target.countCards('j', function (card) {
									var cardj = card.viewAs ? { name: card.viewAs } : card;
									if (get.tag(cardj, 'delay') == 'bad') return false;
									return get.effect(target, cardj, target, player) > 0;
								}) > 0) return 3;
								if (!target.countCards('e'))
									return 1.5;
								if (target.countCards('h'))
									return 0;
							}
							return -1.5;
						},
					},
					tag: {
						loseCard: 1,
						discard: 1
					}
				}
			},
			'tuqiong': {
				audio: 'tuqiong',
				fullskin: true,
				type: 'delay',
				enable: true,
				filterTarget: function (card, player, target) {
					return (lib.filter.judge(card, player, target) && player != target);
				},
				judge: function (card) {
					if (get.suit(card) == 'spade') return 1;
					return -2;
				},
				judge2: function (result) {
					if (result.bool == false) return true;
					return false;
				},
				effect: function () {
					target = card.source;
					if (result.bool == false) {
						player.damage(1, target);
					}
				},
				ai: {
					basic: {
						order: 1,
						useful: 1,
						value: 8,
					},
					result: {
						target: function (player, target) {
							var num = target.hp - target.countCards('h') - 2;
							if (num > -1) return -0.01;
							if (target.hp < 3) num--;
							if (target.isTurnedOver()) num /= 2;
							var dist = get.distance(player, target, 'absolute');
							if (dist < 1) dist = 1;
							return num / Math.sqrt(dist);
						}
					},
					tag: {
						damage: 1,
						draw: 1
					}
				}
			},
			'tufa': {
				audio: "tufa",
				fullskin: true,
				type: 'trick',
				enable: true,
				reverseOrder: true,
				selectTarget: -1,
				filterTarget: function (card, player, target) {
					return true;
				},
				content: function () {
					target.link();
					if (player == target) player.storage._tufa = true;
				},
				ai: {
					wuxie: function (target, card, player, current, state) {
						if (get.attitude(current, player) >= 0 && state > 0) return false;
					},
					basic: {
						order: 7,
						useful: 4,
						value: 3,
					},
					result: {
						target_use: function (player, target) {
							if (player.hasUnknown(2) && get.mode() != 'guozhan') return 0;
							var nh = target.countCards('h');
							if (player.hp <= 2) return -100;
							if ((target.isZhu && nh <= 2 && target.hp <= 1)) return -100;
							if (nh == 0) return -2;
							if (nh == 1) return -1.7
							return -1.5;
						},
						target: function (player, target) {
							var nh = target.countCards('h');
							if (player.hp <= 2) return -100;
							if (target.isZhu && nh <= 2 && target.hp <= 1) return -100;
							if (nh == 0) return -2;
							if (nh == 1) return -1.7
							return -1.5;
						},
					},
					tag: {
						damage: 1,
						firedamage: 1,
						multitarget: 1,
						multineg: 1,
						norepeat: 1
					}
				}
			},
			'mingan': {
				audio: "mingan",
				fullskin: true,
				type: 'trick',
				enable: true,
				reverseOrder: true,
				selectTarget: -1,
				filterTarget: function (card, player, target) {
					if (target == player) {
						return false;
					}

					return true;
				},
				contentBefore: function () {
					player.storage._mingan = [];
					var cards = get.cards();
					player.storage._mingan.push(cards[0]);
					player.showCards(player.storage._mingan);
					game.cardsDiscard(cards);

					game.broadcastAll(function () {
						if (ui.backgroundMusic) ui.backgroundMusic.pause();
						if (lib.config.background_audio) {
							_status.nowaudio = document.createElement("audio");
							_status.nowaudio.src=decodeURI(lib.assetURL + `audio/findgame/chaojimingan.mp3`);
							_status.nowaudio.volume = lib.config.volumn_background / 8;
							_status.nowaudio.autoplay = true;
							_status.nowaudio.loop = true;
							ui.window.appendChild(_status.nowaudio);
						}
					});
				},
				content: function () {
					"step 0"
					event.nowcard = player.storage._mingan.pop();
					if (typeof event.baseDamage != 'number') event.baseDamage = 1;
					if (event.directHit) event._result = { bool: false };
					else {
						var next = target.chooseToRespond();
						next.set('filterCard', function (card) {
							var evt = _status.event.getParent();
							while (evt.name != 'mingan' && evt.parent) evt = evt.getParent();
							if (get.type(card, 'trick') == get.type(evt.nowcard, 'trick')) return true;
							if (get.suit(card) == get.suit(evt.nowcard)) return true;
							if (get.number(card) == get.number(evt.nowcard)) return true;
							return false;
						});
						next.set('ai', function (card) {
							var evt = _status.event.getParent();
							if (get.damageEffect(evt.target, evt.player, evt.target) >= 0) return 0;
							if (evt.target.getCards('e', { subtype: 'equip2' })[0] && evt.target.getCards('e', { subtype: 'equip2' })[0].name == 'Ahuasan') return 0;
							if (evt.player.hasSkillTag('notricksource')) return 0;
							if (evt.target.hasSkillTag('notrick')) return 0;
							return 7 - get.value(card);
						});
					}
					"step 1"
					if (result.bool == false) {
						target.damage(event.baseDamage, event.customSource || player);
						player.storage._mingan.push(event.nowcard);
					}
					else {
						player.storage._mingan.push(result.card);
					}
				},
				contentAfter: function () {
					'step 0'
					game.delay(1);
					'step 1'
					game.broadcastAll(function () {
						ui.window.contains(_status.nowaudio) && ui.window.removeChild(_status.nowaudio);
						if (ui.backgroundMusic) setTimeout(function(){
							ui.backgroundMusic.play();
						},500);
					});	
				},
				ai: {
					wuxie: function (target, card, player, viewer) {
						if (get.attitude(viewer, target) > 0) {
							if (!target.countCards('h') || target.hp == 1 || Math.random() < 0.7) return 0;
						}
					},
					basic: {
						order: 7,
						useful: 5,
						value: 5,
					},
					result: {
						target_use: function (player, target) {
							if (player.hasUnknown(2) && get.mode() != 'guozhan') return 0;
							var nh = target.countCards('h');
							if ((target.isZhu && nh <= 2 && target.hp <= 1)) return -100;
							if (nh == 0) return -2;
							if (nh == 1) return -1.7
							return -1.5;
						},
						target: function (player, target) {
							var nh = target.countCards('h');
							if (target.isZhu && nh <= 2 && target.hp <= 1) return -100;
							if (nh == 0) return -2;
							if (nh == 1) return -1.7
							return -1.5;
						},
					},
					tag: {
						damage: 1,
					}
				}
			},
			'wudou': {
				audio: "wudou",
				fullskin: true,
				type: 'trick',
				enable: true,
				selectTarget: 1,
				filterTarget: function (event, player, target) {
					return player != target;
				},
				content: function () {
					'step 0'
					if (!target.hasSkill('wudou1'))
						target.addTempSkill('wudou1');
					if (!player.hasSkill('wudou1'))
						player.addTempSkill('wudou1');
					player.storage.wudou1 = true;
					target.storage.wudou1 = true;
					for (var i = 0; i < game.players.length; i++)
						if (game.players[i] != player && game.players[i] != target && !game.players[i].hasSkill('wudou2'))
							game.players[i].addTempSkill('wudou2');

					game.log('舞斗会开始了');
					game.log("———————————");
					event.cnt = 0;
					event.num = 0;
					event.par = [player, target];
					'step 1'
					current = event.par[event.cnt & 1];
					event.cnt++;
					current.target = event.par[event.cnt & 1];
					if (current.storage.wudou1 == false || current.target.storage.wudou1 == false) {
						event.goto(4);
					}
					else if (current.hp < 1 || current.target.hp < 1) {
						event.goto(4);
					}
					"step 2"
					current.chooseToUse('舞斗：使用一张牌或受到1点伤害', function (card) {
						if (card.name == 'wudou') return false;
						return lib.filter.filterCard.apply(this, arguments)
					}).set('ai', function (player, card) {
						var otr;
						if (get.attitude(player, otr) < 0) return get.value(card);
						if (event.cnt > 3 && player.hasSkillTag('maixie')) return false;
					});
					"step 3"
					if (result.bool == false) {
						current.damage(1, current.target);
						event.goto(4);
					}
					else if (current.storage.wudou1 == false || current.target.storage.wudou1 == false) {
						event.goto(4);
					}
					else if (current.hp < 1 || current.target.hp < 1) {
						event.goto(4);
					}
					else if (result.bool == true) {
						current.draw();
						event.goto(1);
					}
					"step 4"
					game.log("———————————");
					event.winner;
					if (current.target.storage.wudou1 == false) {
						game.log('舞斗会以', current.target, '的胜利告终');
						event.winner = current.target;
					}
					else if (current.storage.wudou1 == false) {
						game.log('舞斗会以', current, '的胜利告终');
						event.winner = current;
					}
					//贝拉2成就
					if (event.winner) event.winner.checkChallenge(event, 'CLbeila2', 'character', 'onehun');

					delete current.target.storage.wudou1;
					delete current.storage.wudou1;
					if (current.hasSkill('wudou1'))
						current.removeSkill('wudou1');
					if (current.target.hasSkill('wudou1'))
						current.target.removeSkill('wudou1');
					for (var i = 0; i < game.players.length; i++)
						if (game.players[i] != player && game.players[i] != targets[0] && game.players[i].hasSkill('wudou2'))
							game.players[i].removeSkill('wudou2');
				},
				ai: {
					wuxie: function (target, card, player, viewer) {
						if (player == game.me && get.attitude(viewer, player) > 0) {
							return 0;
						}
					},
					basic: {
						order: 8,
						useful: 1,
						value: 5
					},
					result: {
						target: function (player, target, card) {
							var num1 = 0;
							var num2 = 0;
							var hs1 = player.CountCardUsable();
							var hs2 = target.CountCardUsable();
							if (hs1 > hs2) return -2.5;
							if (hs1 < hs2) return 0;
							return -1;
						},
						player: function (player, target, card) {
							var num1 = 0;
							var num2 = 0;
							var hs1 = player.CountCardUsable();
							var hs2 = target.CountCardUsable();
							if (hs1 < hs2) return -2.5;
							if (hs1 > hs2) return 0;
							return 1;
						}
					},
					tag: {
						damage: 1,
						use: 1,
					}
				}
			},
			'caiming': {
				audio: 'caiming',
				fullskin: true,
				type: 'trick',
				enable: true,
				selectTarget: 1,
				range: { global: 1 },
				filterTarget: function (event, player, target) {
					//	return true;
					return player != target;
				},
				content: function () {
					'step 0'
					event.prompt = '选择一首歌';
					player.chooseButton([event.prompt, [['Gmangzhong', 'Gdaben', 'Gyunyan'], 'vcard']], true, function (button) {
						return Math.floor(Math.random() * 3);
					});
					'step 1'
					if (result.links[0][2] == 'Gmangzhong') event.num = 0;
					else if (result.links[0][2] == 'Gdaben') event.num = 1;
					else if (result.links[0][2] == 'Gyunyan') event.num = 2;
					target.chooseControl('二字', '三字', '四字', true).set('prompt', '猜测歌名的字数').set('ai', function (button) {
						return Math.floor(Math.random() * 3);
					});
					'step 2'
					var str = '';
					if (event.num == 0) str += get.translation('Gmangzhong');
					else if (event.num == 1) str += get.translation('Gdaben');
					else if (event.num == 2) str += get.translation('Gyunyan');
					game.log('#b' + get.translation(player.name), '选择的歌是', '#b' + str, ',', '#b' + get.translation(target.name), '猜测歌名的字数是', '#g' + (result.index + 2));
					if (event.num != result.index) {
						target.damage(1, 'thunder');
					}
					'step 3'
					game.delayx();
				},
				ai: {
					wuxie: function (target, card, player, current, state) {
						if (get.attitude(current, player) >= 0 && state > 0) return false;
					},
					basic: {
						order: 4,
						useful: 1,
						value: 5.5
					},
					result: {
						target: -3,
					},

					tag: {
						damage: 1,
						thunderDamage: 1,
						natureDamage: 1,
					}
				}
			},
			'shuimu': {
				audio: 'shuimu',
				fullskin: true,
				type: 'delay',
				enable: true,
				selectTarget: -1,
				filterTarget: function (card, player, target) {
					return (lib.filter.judge(card, player, target) && player == target);
				},
				judge: function (card) {
					if (get.suit(card) == 'diamond') return -2;
					return 1;
				},
				judge2: function (result) {
					if (result.bool == false) return false;
					return true;
				},
				effect: function () {
					'step 0'
					if (result.bool == true) {
						var list = ['摸一张牌', '卜算三张牌'];
						//	var list = ['摸一张牌', '观看牌堆顶的两张牌', '观看一名玩家的手牌'];
						player.chooseControlList('选择一项：', list, function (event, player) {
							if (player.countCards('j') >= 1) return 1;
							return 0;
						});
						player.addJudge(card);
					}
					else {
						event.finish();
					}
					'step 1'
					if (result.index == 0) {
						player.draw();
						event.finish();
					}
					else if (result.index == 1) {
						player.chooseToGuanxing(3);
						//				player.watchCards(2);
						event.finish();
					}
					//			else if (result.index == 2) {
					//				player.chooseTarget('观看一名角色的手牌', function (card, player, target) {
					//					return target != player && target.countCards('h') > 0;
					//				}).ai = function (target) {
					//					return -get.attitude(player, target);
					//				};
					//			}
					else {
						event.finish();
					}

					//			'step 2'
					//			player.watchTargetHandCards(result.targets[0]);
				},
				ai: {
					basic: {
						order: 7.2,
						useful: 4.5,
						value: 7.2
					},
					result: {
						target: 2,
					},
					tag: {
						delay: 'good',
						watchCards: 2,
						draw: 1
					}
				}
			},
			pengran: {
				audio: true,
				fullskin: true,
				type: 'trick',
				enable: true,
				delay_prompt: '出牌阶段对一名其他角色使用，将该牌置入其判定区内。其弃置一张大于判定牌点数的牌，否则受到1点自适应伤害。',
				selectTarget: 1,
				postAi: function (targets) {
					return targets.length == 1 && targets[0].countCards('h');
				},
				filterTarget: function (card, player, target) {
					if (player == target) return false;
					return target.countCards('h') > 0 && player.canCompare(target);
				},
				content: function () {
					"step 0"
					player.chooseToCompare(target);
					"step 1"
					if (result.bool) {
						var cards = [result.player, result.target];
						player.gain(cards, 'gain2');
					}
				},

				ai: {
					wuxie: function (target, card, player, viewer) {
						if (get.attitude(viewer, player) > 0 && get.attitude(viewer, target) > 0) {
							return 0;
						}
					},
					basic: {
						order: 7.5,
						useful: 4,
						value: 8
					},
					result: {
						target: function (player, target) {
							var maxnum = 0;
							var cards2 = target.getCards('h');
							for (var i = 0; i < cards2.length; i++) {
								if (cards2[i].number > maxnum) {
									maxnum = cards2[i].number;
								}
							}
							var maxnum1 = 0;
							var cards = player.getCards('h');
							for (var i = 0; i < cards.length; i++) {
								if (cards[i].number > maxnum1) maxnum1 = cards[i].number;
							}
							if (maxnum > maxnum1) return -2;
							return -0.5;
						},
						player: function (player, target) {
							var maxnum = 0;
							var cards2 = target.getCards('h');
							for (var i = 0; i < cards2.length; i++) {
								if (cards2[i].number > maxnum) {
									maxnum = cards2[i].number;
								}
							}
							var maxnum1 = 0;
							var cards = player.getCards('h');
							for (var i = 0; i < cards.length; i++) {
								if (cards[i].number > maxnum1) maxnum1 = cards[i].number;
							}
							if (maxnum > maxnum1) return 2;
							return -1;
						}
					},
					tag: {
						loseCard: 1,
						gain: 1,
						compare: 1,
					}
				}
			},
			//new equip for A-SOUL
			'Atiegun': {
				fullskin: true,
				type: 'equip',
				subtype: 'equip1',
				distance: { attackFrom: -2 },
				ai: {
					basic: {
						equipValue: 4.5,
					}
				},
				skills: ['Atiegun_skill']
			},
			'Ashanzi': {
				fullskin: true,
				type: 'equip',
				subtype: 'equip1',
				distance: { attackFrom: -1 },
				ai: {
					ai: {
						order: function () {
							return get.order({ name: 'sha' }) + 0.1;
						},
						equipValue: function (card, player) {
							if (player._Ashanzi_temp) return 1;
							player._Ashanzi_temp = true;
							var result = function () {
								if (!game.hasPlayer(function (current) {
									return get.distance(player, current) <= 1 && player.canUse('sha', current) && get.effect(current, { name: 'sha' }, player, player) > 0;
								})) {
									return 3;
								}
								if (player.hasSha() && _status.currentPhase == player) {
									if (player.getEquip('Ashanzi') && player.countUsed('sha') || player.getCardUsable('sha') == 0) {
										return 8;
									}
								}
								var num = player.countCards('h', 'sha');
								if (num > 1) return 5 + num;
								return 3 + num;
							}();
							delete player._Ashanzi_temp;
							return result;
						},
						basic: {
							equipValue: 5
						},
						tag: {
							valueswap: 1
						}
					},
				},
				skills: ['Ashanzi_skill']
			},
			'Ashoubing': {
				fullskin: true,
				type: 'equip',
				subtype: 'equip1',
				distance: { attackFrom: -4 },
				ai: {
					ai: {
						order: function () {
							return get.order({ name: 'sha' }) + 0.1;
						},
						equipValue: function (card, player) {
							if (player.hasSkillTag('guopai')) return 10;
							if (player.hasSkillTag('shaneed')) return 0;
							if (!game.hasPlayer(function (current) {
								return get.distance(player, current) <= 1 && player.canUse('sha', current) && get.effect(current, { name: 'sha' }, player, player) > 0;
							})) {
								return 6;
							}
							return 1;
						},
						basic: {
							equipValue: 2
						},
					},
				},
				skills: ['Ashoubing_skill']
			},
			'Ahuasan': {
				fullskin: true,
				type: 'equip',
				subtype: 'equip2',
				ai: {
					basic: {
						equipValue: 8
					}
				},
				skills: ['Ahuasan_skill']
			},
			'Abinggan': {
				fullskin: true,
				type: 'equip',
				subtype: 'equip2',
				onLose: function () {
					var next = game.createEvent('Abinggan_lose');
					event.next.remove(next);
					var evt = event.getParent();
					if (evt.getlx === false) evt = evt.getParent();
					evt.after.push(next);
					next.player = player;
					next.setContent(function () {
						var cards = player.getCards('j', function (card) {
							var name = card.viewAs || card.name;
							return name == 'tao_delay' && lib.filter.cardDiscardable(card, player);
						});
						if (cards.length) player.discard(cards);
					});
				},
				filterLose: function (card, player) {
					if (player.hasSkillTag('unequip2')) return false;
					return true;
				},
				ai: {
					basic: {
						equipValue: 6.5,
						value: 7,
					}
				},
				skills: ['Abinggan_skill']
			},
			'Amanniu': {
				type: 'equip',
				subtype: 'equip4',
				fullskin: true,
				distance: {
					globalFrom: -1,
				},
				skills: ['Amanniu_skill', 'Amanniu_equip', 'Amanniu_clear'],
				ai: {
					order: 7,
					equipValue: function (card, player) {
						if (player.hasSkillTag('shaneed')) return 4;
						else return 2;
					},
					value: function (card, player) {
						if (player.getEquip(2) == card) return 0;
						return 0.5;
					},
					basic: {
						equipValue: 2,
					},
				},
			},
			'Ayangtuo': {
				type: 'equip',
				subtype: 'equip3',
				fullskin: true,
				equipDelay: false,
				loseDelay: false,
				distance: { globalTo: 0 },
				skills: ['Ayangtuo_skill'],
				ai: {
					equipValue: 1.5,
					basic: {
						equipValue: 1.5,
					},
				}
			},
			'Azhijiangstar': {
				type: 'equip',
				subtype: 'equip5',
				fullskin: true,
				onLose: function () {
					var next = game.createEvent('Azhijiangstar_draw');
					event.next.remove(next);
					var evt = event.getParent();
					if (evt.getlx === false) evt = evt.getParent();
					evt.after.push(next);
					next.player = player;
					next.setContent(function () {
						if (player.countCards('h') < player.maxHp) {
							player.logSkill('Azhijiangstar_skill');
							player.drawTo(Math.min(5, player.maxHp));
						}
					});
				},
				filterLose: function (card, player) {
					if (player.hasSkillTag('unequip2')) return false;
					return true;
				},
				skills: ['Azhijiangstar_skill'],
				tag: {
					draw: 2,
				},
				ai: {
					equipValue: function (card,player) {
						if(!player.countCards('h')) return 8;
						if(!player.countCards('h')<player.maxHp) return 8;
						return 4;
					},
					basic: {
						equipValue: 5
					},
				}
			},
			'Ajiutong': {
				fullskin: true,
				type: 'equip',
				subtype: 'equip2',
				onLose: function () {
					var next = game.createEvent('Ajiutong_lose');
					event.next.remove(next);
					var evt = event.getParent();
					if (evt.getlx === false) evt = evt.getParent();
					evt.after.push(next);
					next.player = player;
					next.setContent(function () {
						var cards = player.getCards('j', function (card) {
							var name = card.viewAs || card.name;
							return name == 'jiu_delay' && lib.filter.cardDiscardable(card, player);
						});
						if (cards.length) player.discard(cards);
					});
				},
				filterLose: function (card, player) {
					if (player.hasSkillTag('unequip2')) return false;
					return true;
				},
				ai: {
					basic: {
						equipValue: 4.5
					}
				},
				skills: ['Ajiutong_skill']
			},
		},
		skill: {
			zhuge_skill: {
				equipSkill: true,
				audio: true,
				firstDo: true,
				trigger: { player: 'useCard1' },
				forced: true,
				filter: function (event, player) {
					return !event.audioed && event.card.name == 'sha' && player.countUsed('sha', true) > 1 && event.getParent().type == 'phase';
				},
				content: function () {
					trigger.audioed = true;
				},
				mod: {
					cardUsable: function (card, player, num) {
						var cardx = player.getEquip('zhuge');
						if (card.name == 'sha' && (!cardx || player.hasSkill('zhuge_skill', null, false) || (!_status.zhuge_temp && !ui.selected.cards.contains(cardx)))) {
							if (get.is.versus() || get.is.changban()) {
								return num + 3;
							}
							return Infinity;
						}
					},
					cardEnabled2: function (card, player) {
						if (!_status.event.addCount_extra || player.hasSkill('zhuge_skill', null, false)) return;
						if (card && card == player.getEquip('zhuge')) {
							try {
								var cardz = get.card();
							}
							catch (e) {
								return;
							}
							if (!cardz || cardz.name != 'sha') return;
							_status.zhuge_temp = true;
							var bool = lib.filter.cardUsable(get.autoViewAs({ name: 'sha' }, ui.selected.cards.concat([card])), player);
							delete _status.zhuge_temp;
							if (!bool) return false;
						}
					},
				},
			},
			cixiong_skill: {
				equipSkill: true,
				trigger: { player: 'useCardToPlayered' },
				audio: true,
				logTarget: 'target',
				check: function (event, player) {
					if (get.attitude(player, event.target) > 0) return true;
					var target = event.target;
					return target.countCards('h') == 0 || !target.hasSkillTag('noh');
				},
				filter: function (event, player) {
					if (event.card.name != 'sha') return false;
					return player.differentSexFrom(event.target);
				},
				content: function () {
					"step 0"
					trigger.target.chooseToDiscard('弃置一张手牌，或令' + get.translation(player) + '摸一张牌').set('ai', function (card) {
						var trigger = _status.event.getTrigger();
						return -get.attitude(trigger.target, trigger.player) - get.value(card);
					});
					"step 1"
					if (result.bool == false) player.draw();
				}
			},
			zhangba_skill: {
				equipSkill: true,
				enable: ['chooseToUse', 'chooseToRespond'],
				filterCard: true,
				selectCard: 2,
				position: 'hs',
				viewAs: { name: 'sha' },
				complexCard: true,
				filter: function (event, player) {
					return player.countCards('hs') >= 2;
				},
				audio: true,
				prompt: '将两张手牌当杀使用或打出',
				check: function (card) {
					if (card.name == 'sha') return 0;
					return 5 - get.value(card)
				},
				ai: {
					respondSha: true,
					skillTagFilter: function (player) {
						return player.countCards('hs') >= 2;
					},
				}
			},
			guanshi_skill: {
				equipSkill: true,
				trigger: { player: 'shaMiss' },
				direct: true,
				audio: true,
				filter: function (event, player) {
					return player.countCards('he', function (card) {
						return card != player.getEquip('guanshi');
					}) >= 2 && event.target.isAlive();
				},
				content: function () {
					"step 0"
					var next = player.chooseToDiscard(get.prompt('guanshi'), 2, 'he', function (card) {
						return _status.event.player.getEquip('guanshi') != card;
					});
					next.logSkill = 'guanshi_skill';
					next.set('ai', function (card) {
						var evt = _status.event.getTrigger();
						if (get.attitude(evt.player, evt.target) < 0) {
							if (evt.baseDamage + evt.extraDamage >= Math.min(2, evt.target.hp)) {
								return 8 - get.value(card)
							}
							return 5 - get.value(card)
						}
						return -1;
					});
					"step 1"
					if (result.bool) {
						trigger.untrigger();
						trigger.trigger('shaHit');
						trigger._result.bool = false;
						trigger._result.result = null;
					}
				},
				ai: {
					directHit_ai: true,
					skillTagFilter: function (player, tag, arg) {
						if (player._guanshi_temp) return;
						player._guanshi_temp = true;
						var bool = (get.attitude(player, arg.target) < 0 && arg.card.name == 'sha' && player.countCards('he', function (card) {
							return card != player.getEquip('guanshi') && card != arg.card && (!arg.card.cards || !arg.card.cards.contains(card)) && get.value(card) < 5;
						}) > 1);
						delete player._guanshi_temp;
						return bool;
					},
				},
			},
			bagua_skill: {
				equipSkill: true,
				trigger: { player: ['chooseToRespondBegin', 'chooseToUseBegin'] },
				filter: function (event, player) {
					if (event.responded) return false;
					if (event.bagua_skill) return false;
					if (!event.filterCard || !event.filterCard({ name: 'shan' }, player, event)) return false;
					if (event.name == 'chooseToRespond' && !lib.filter.cardRespondable({ name: 'shan' }, player, event)) return false;
					if (player.hasSkillTag('unequip2')) return false;
					var evt = event.getParent();
					if (evt.player && evt.player.hasSkillTag('unequip', false, {
						name: evt.card ? evt.card.name : null,
						target: player,
						card: evt.card
					})) return false;
					return true;
				},
				audio: true,
				check: function (event, player) {
					if (event && (event.ai || event.ai1)) {
						var ai = event.ai || event.ai1;
						var tmp = _status.event;
						_status.event = event;
						var result = ai({ name: 'shan' }, _status.event.player, event);
						_status.event = tmp;
						return result > 0;
					}
					return true;
				},
				content: function () {
					"step 0"
					trigger.bagua_skill = true;
					player.judge('bagua', function (card) { return (get.color(card) == 'red') ? 1.5 : -0.5 }).judge2 = function (result) {
						return result.bool;
					};
					"step 1"
					if (result.judge > 0) {
						trigger.untrigger();
						trigger.set('responded', true);
						trigger.result = { bool: true, card: { name: 'shan', isCard: true } }
					}
				},
				ai: {
					respondShan: true,
					effect: {
						target: function (card, player, target, effect) {
							if (target.hasSkillTag('unequip2')) return;
							if (player.hasSkillTag('unequip', false, {
								name: card ? card.name : null,
								target: target,
								card: card
							}) || player.hasSkillTag('unequip_ai', false, {
								name: card ? card.name : null,
								target: target,
								card: card
							})) return;
							if (get.tag(card, 'respondShan')) return 0.5;
						}
					}
				}
			},
			yitianjian: {
				audio: true,
				trigger: { source: 'damageSource' },
				direct: true,
				equipSkill: true,
				filter: function (event, player) {
					return event.card && event.card.name == 'sha' && event.getParent().name == 'sha' && player.isDamaged() && player.countCards('h') > 0;
				},
				content: function () {
					'step 0'
					player.chooseToDiscard('h', get.prompt('yitianjian'), '弃置一张手牌并回复1点体力').set('ai', (card) => 7 - get.value(card)).logSkill = 'yitianjian';
					'step 1'
					if (result.bool) player.recover();
				},
			},
			serafuku: {
				audio: true,
				trigger: { target: 'useCardToTargeted' },
				forced: true,
				equipSkill: true,
				filter: function (event, player) {
					return event.card.name == 'sha' && player.hasSex('male');
				},
				content: function () {
					'step 0'
					player.judge(function (card) {
						return get.color(card) == 'black' ? -2 : 0;
					}).judge2 = function (result) {
						return result.bool == false ? true : false;
					};
					'step 1'
					if (result.bool === false) {
						var map = trigger.customArgs, id = player.playerid;
						if (!map[id]) map[id] = {};
						if (!map[id].extraDamage) map[id].extraDamage = 0;
						map[id].extraDamage++;
						game.log(trigger.card, '对', player, '的伤害+1');
					}
				},
			},
			/*yinfengyi: {
				audio: true,
				equipSkill: true,
				forced: true,
				trigger: { player: ['damageBegin3', 'loseHpBegin'] },
				filter: function (event, player) {
					if (event.name == 'damage') return event.card && get.type2(event.card) == 'trick';
					return event.type == 'du';
				},
				content: function () {
					trigger.num++;
				},
			},*/
			yinfengyi: {
				audio: true,
				equipSkill: true,
				forced: true,
				trigger: { player: ['damageBegin3', 'loseHpBegin'] },
				filter: function (event, player) {
					if(event.type == 'du') return true;
					if (event.nature != 'thunder') return false;
					if (player.hasSkillTag('unequip2')) return false;
					if (event.source && event.source.hasSkillTag('unequip', false, {
						name: event.card ? event.card.name : null,
						target: player,
						card: event.card
					})) return false;
					return true;
				},
				content: function () {
					trigger.num++;
				},
			},
			zhanxiang: {
				audio: true,
				equipSkill: true,
				forced: true,
				trigger: { target: '_yongjian_zengyuBegin' },
				content: function () {
					trigger._zengyu_denied = true;
					game.log(player, '拒绝了', trigger.player, '发起的赠予');
				},
				ai: {
					refuseGifts: true,
				},
			},
			xinge: {
				audio: true,
				enable: 'phaseUse',
				usable: 1,
				filter: function (event, player) {
					return player.countCards('h') > 0;
				},
				filterCard: true,
				position: 'h',
				filterTarget: lib.filter.notMe,
				discard: false,
				lose: false,
				delay: false,
				content: function () {
					target.gain(cards, player, 'giveAuto');
				},
			},
			qixingbaodao: {
				trigger: { player: 'equipAfter' },
				forced: true,
				equipSkill: true,
				filter: function (event, player) {
					return event.card.name == 'qixingbaodao' && player.hasCard(function (card) {
						return card != event.card;
					}, 'ej');
				},
				content: function () {
					var cards = player.getCards('ej', function (card) {
						return card != trigger.card && lib.filter.cardDiscardable(card, player, 'qixingbaodao');
					});
					if (cards.length) player.discard(cards);
				},
			},
			muniu_skill: {
				equipSkill: true,
				enable: 'phaseUse',
				usable: 1,
				filterCard: true,
				check: function (card) {
					if (card.name == 'du') return 20;
					var player = _status.event.player;
					var nh = player.countCards('h');
					if (!player.needsToDiscard()) {
						if (nh < 3) return 0;
						if (nh == 3) return 5 - get.value(card);
						return 7 - get.value(card);
					}
					return 10 - get.useful(card);
				},
				discard: false,
				lose: false,
				delay: false,
				sync: function (muniu) {
					if (game.online) {
						return;
					}
					if (!muniu.cards) {
						muniu.cards = [];
					}
					for (var i = 0; i < muniu.cards.length; i++) {
						if (get.position(muniu.cards[i]) != 's') {
							muniu.cards.splice(i--, 1);
						}
					}
					game.broadcast(function (muniu, cards) {
						muniu.cards = cards;
					}, muniu, muniu.cards);
				},
				filter: function (event, player) {
					return player.countCards('h') > 0;
				},
				prepare: function (cards, player) {
					player.$give(1, player, false);
				},
				content: function () {
					"step 0"
					player.loseToSpecial(cards, 'muniu');
					"step 1"
					for (var i = 0; i < cards.length; i++) {
						if (cards[i].destroyed || !cards[i].hasGaintag('muniu') || get.position(cards[i]) != 's') {
							cards[i].remove();
							cards.splice(i--, 1);
						}
					}
					var muniu = player.getEquip(5);
					if (!muniu || !cards.length) {
						for (var i = 0; i < cards.length; i++) {
							cards[i].discard();
						}
						event.finish();
						return;
					}
					if (muniu.cards == undefined) muniu.cards = [];
					muniu.cards.push(cards[0]);
					game.broadcast(function (muniu, cards) {
						muniu.cards = cards;
					}, muniu, muniu.cards);
					game.delayx();
					"step 2"
					var players = game.filterPlayer(function (current) {
						if (!current.getEquip(5) && current != player && !current.isTurnedOver() &&
							get.attitude(player, current) >= 3 && get.attitude(current, player) >= 3) {
							return true;
						}
					});
					players.sort(lib.sort.seat);
					var choice = players[0];
					var next = player.chooseTarget('是否移动木牛流马？', function (card, player, target) {
						return !target.isMin() && player != target && target.isEmpty(5);
					});
					next.set('ai', function (target) {
						return target == _status.event.choice ? 1 : -1;
					});
					next.set('choice', choice);
					"step 3"
					if (result.bool) {
						var card = player.getEquip(5);
						result.targets[0].equip(card);
						player.$give(card, result.targets[0]);
						player.line(result.targets, 'green');
						game.delay();
					}
					else {
						player.updateMarks();
					}
				},
				ai: {
					order: 1,
					expose: 0.1,
					result: {
						player: 1
					}
				},
				mod: {
					cardEnabled2: function (card, player) {
						if (!ui.selected.cards.length) return;
						var muniu = player.getEquip('muniu');
						if (!muniu || !muniu.cards || !muniu.cards.length) return;
						for (var i of ui.selected.cards) {
							if (i == muniu && muniu.cards.contains(card)) return false;
							if (muniu.cards.contains(i) && card == muniu) return false;
						}
					},
				},
				mark: true,
				intro: {
					content: function (storage, player) {
						var muniu = player.getEquip(5);
						if (!muniu || !muniu.cards || !muniu.cards.length) return '共有〇张牌';
						if (player.isUnderControl(true)) {
							return get.translation(muniu.cards);
						}
						else {
							return '共有' + get.cnNumber(muniu.cards.length) + '张牌';
						}
					},
					mark: function (dialog, storage, player) {
						var muniu = player.getEquip(5);
						if (!muniu || !muniu.cards || !muniu.cards.length) return '共有〇张牌';
						if (player.isUnderControl(true)) {
							dialog.addAuto(muniu.cards);
						}
						else {
							return '共有' + get.cnNumber(muniu.cards.length) + '张牌';
						}
					},
					markcount: function (storage, player) {
						var muniu = player.getEquip(5);
						if (muniu && muniu.cards) return muniu.cards.length;
						return 0;
					}
				}
			},
			muniu_skill7: {
				trigger: { player: 'loseEnd' },
				firstDo: true,
				forced: true,
				//silent:true,
				filter: function (event, player) {
					if (!event.ss || !event.ss.length || event.parent.name == 'lose_muniu') return false;
					var muniu = player.getEquip('muniu');
					if (!muniu || !muniu.cards) return false;
					return event.ss.filter(function (card) {
						return muniu.cards.contains(card);
					}).length > 0;
				},
				content: function () {
					var muniu = player.getEquip(5);
					if (muniu && muniu.cards) {
						muniu.cards.removeArray(trigger.ss);
						lib.skill.muniu_skill.sync(muniu);
					}
					player.updateMarks();
				},
			},
			jiu: {
				trigger: { player: 'useCard1' },
				filter: function (event) {
					return event.card && event.card.name == 'sha';
				},
				forced: true,
				charlotte: true,
				firstDo: true,
				content: function () {
					if (!trigger.baseDamage) trigger.baseDamage = 1;
					trigger.baseDamage += player.storage.jiu;
					trigger.jiu = true;
					trigger.jiu_add = player.storage.jiu;
					game.addVideo('jiuNode', player, false);
					game.broadcastAll(function (player) {
						player.removeSkill('jiu');
					}, player);
				},
				temp: true,
				vanish: true,
				silent: true,
				popup: false,
				nopop: true,
				onremove: function (player) {
					if (player.node.jiu) {
						player.node.jiu.delete();
						player.node.jiu2.delete();
						delete player.node.jiu;
						delete player.node.jiu2;
					}
					delete player.storage.jiu;
				},
				ai: {
					damageBonus: true
				},
				group: 'jiu2'
			},
			jiu2: {
				trigger: { player: 'useCardAfter', global: 'phaseAfter' },
				priority: 2,
				firstDo: true,
				charlotte: true,
				filter: function (event) {
					if (event.name == 'useCard') return (event.card && (event.card.name == 'sha'));
					return true;
				},
				forced: true,
				popup: false,
				audio: false,
				content: function () {
					game.broadcastAll(function (player) {
						player.removeSkill('jiu');
					}, player);
					game.addVideo('jiuNode', player, false);
				},
			},
			guding_skill: {
				equipSkill: true,
				audio: true,
				trigger: { source: 'damageBegin1' },
				filter: function (event) {
					if (event.parent.name == '_lianhuan' || event.parent.name == '_lianhuan2') return false;
					if (event.card && event.card.name == 'sha') {
						if (event.player.countCards('h') == 0) return true;
					}
					return false;
				},
				forced: true,
				content: function () {
					trigger.num++;
				},
				ai: {
					effect: {
						player: function (card, player, target, current, isLink) {
							if (card.name == 'sha' && !isLink && target.countCards('h') == 0 && !target.hasSkillTag('filterDamage', null, {
								player: player,
								card: card,
							})) return [1, 0, 1, -3];
						}
					}
				}
			},
			/*tengjia1: {
				equipSkill: true,
				trigger: { target: ['useCardToBefore'] },
				forced: true,
				priority: 6,
				audio: true,
				filter: function (event, player) {
					if (player.hasSkillTag('unequip2')) return false;
					if (event.player.hasSkillTag('unequip', false, {
						name: event.card ? event.card.name : null,
						target: player,
						card: event.card
					})) return false;
					if (event.card.name == 'nanman') return true;
					if (event.card.name == 'wanjian') return true;
					//if(event.card.name=='chuqibuyi') return true;
					return false;
				},
				content: function () {
					trigger.cancel();
				},
				ai: {
					effect: {
						target: function (card, player, target, current) {
							if (target.hasSkillTag('unequip2')) return;
							if (player.hasSkillTag('unequip', false, {
								name: card ? card.name : null,
								target: target,
								card: card
							}) || player.hasSkillTag('unequip_ai', false, {
								name: card ? card.name : null,
								target: target,
								card: card
							})) return;
							//if(card.name=='nanman'||card.name=='wanjian'||card.name=='chuqibuyi') return 'zerotarget';
							if (card.name == 'nanman' || card.name == 'wanjian') return 'zerotarget';
							if (card.name == 'sha') {
								var equip1 = player.getEquip(1);
								if (equip1 && equip1.name == 'zhuque') return 1.9;
								if (!card.nature) return 'zerotarget';
							}
						}
					}
				}
			},*/
			tengjia2: {
				equipSkill: true,
				trigger: { player: 'damageBegin3' },
				filter: function (event, player) {
					if (event.nature != 'fire') return false;
					if (player.hasSkillTag('unequip2')) return false;
					if (event.source && event.source.hasSkillTag('unequip', false, {
						name: event.card ? event.card.name : null,
						target: player,
						card: event.card
					})) return false;
					return true;
				},
				audio: true,
				forced: true,
				content: function () {
					trigger.num++;
				},
				ai: {
					fireAttack: true,
					effect: {
						target: function (card, player, target, current) {
							if (card.name == 'sha') {
								if (card.nature == 'fire') return 2;
								if (player.hasSkill('zhuque_skill')) return 1.9;
							}
							if (get.tag(card, 'fireDamage') && current < 0) return 2;
						}
					}
				}
			},
			/*tengjia3: {
				equipSkill: true,
				audio: 'tengjia1',
				trigger: { target: 'shaBefore' },
				forced: true,
				filter: function (event, player) {
					if (player.hasSkillTag('unequip2')) return false;
					if (event.player.hasSkillTag('unequip', false, {
						name: event.card ? event.card.name : null,
						target: player,
						card: event.card
					})) return false;
					if (event.card.name == 'sha' && !event.card.nature) return true;
					return false;
				},
				content: function () {
					trigger.cancel();
				},
			},*/
			baiyin_skill: {
				equipSkill: true,
				trigger: { player: 'damageBegin4' },
				forced: true,
				audio: true,
				filter: function (event, player) {
					if (event.num <= 1) return false;
					if (player.hasSkillTag('unequip2')) return false;
					if (event.source && event.source.hasSkillTag('unequip', false, {
						name: event.card ? event.card.name : null,
						target: player,
						card: event.card
					})) return false;
					return true;
				},
				//priority:-10,
				content: function () {
					trigger.num = 1;
				},
				ai: {
					filterDamage: true,
					skillTagFilter: function (player, tag, arg) {
						if (player.hasSkillTag('unequip2')) return false;
						if (arg && arg.player) {
							if (arg.player.hasSkillTag('unequip', false, {
								name: arg.card ? arg.card.name : null,
								target: player,
								card: arg.card,
							})) return false;
							if (arg.player.hasSkillTag('unequip_ai', false, {
								name: arg.card ? arg.card.name : null,
								target: player,
								card: arg.card,
							})) return false;
							if (arg.player.hasSkillTag('jueqing', false, player)) return false;
						}
					},
				},
			},
			zhuque_skill: {
				equipSkill: true,
				trigger: { player: 'useCard1' },
				//priority:7,
				filter: function (event, player) {
					if (event.card.name == 'sha' && !event.card.nature) return true;
				},
				audio: true,
				check: function (event, player) {
					var eff = 0;
					for (var i = 0; i < event.targets.length; i++) {
						var target = event.targets[i];
						var eff1 = get.damageEffect(target, player, player);
						var eff2 = get.damageEffect(target, player, player, 'fire');
						eff += eff2;
						eff -= eff1;
					}
					return eff >= 0;
				},
				content: function () {
					trigger.card.nature = 'fire';
					if (get.itemtype(trigger.card) == 'card') {
						var next = game.createEvent('zhuque_clear');
						next.card = trigger.card;
						event.next.remove(next);
						trigger.after.push(next);
						next.setContent(function () {
							delete card.nature;
						});
					}
				}
			},
			zhuque_skill2: {
				trigger: { player: 'useCardAfter' },
				forced: true,
				popup: false,
				content: function () {
					delete player.storage.zhuque_skill.nature;
				}
			},
			g_du: {
				trigger: {
					player: ['loseBegin', 'compare'],
					global: ['equipBegin', 'addJudgeBegin', 'gainBegin', 'loseAsyncBegin'],
					target: 'compare',
				},
				cardSkill: true,
				filter: function (event, player, name) {
					if (name == 'compare') {
						if (player == event.player) {
							if (event.iwhile > 0) return false;
							return event.card1.name == 'du';
						}
						return event.card2.name == 'du';
					}
					if (event.name != 'equip' && event.name != 'addJudge' && !event.visible) return false;
					var evt = event.getlx === false ? event : event.getl(player);
					if (!evt || !evt.cards || !evt.cards.filter(function (i) {
						return get.name(i, player) == 'du' && i.parentNode && i.parentNode.classList.contains('handcards');
					}).length) return false;
					for (var i of lib.skill.g_du.whiteListFilter) {
						if (i(event, player)) return false;
					}
					return true;
				},
				whiteListFilter: [
					(event) => event.getParent(2).name == 'g_du_give',
					(event) => event.getParent(3).name == 'guaguliaodu',
					(event) => event.getParent(3).name == 'guagu_delay',
				],
				forced: true,
				popup: false,
				content: function () {
					'step 0'
					if (trigger.delay === false) game.delayx();
					'step 1'
					game.log(player, '触发了', '#g【毒】', '的效果');
					var num = 1;
					if (typeof trigger.getl == 'function') {
						num = (trigger.getlx === false ? trigger : trigger.getl(player)).cards.filter(function (i) {
							return get.name(i, player) == 'du';
						}).length;
					}
					player.loseHp(num).type = 'du';
				},
			},
			/*g_du: {
				trigger: {
					player: ['loseAfter', 'compare'],
					global: ['equipAfter', 'addJudgeAfter', 'gainAfter', 'loseAsyncAfter'],
					target: 'compare',
				},
				cardSkill: true,
				filter: function (event, player, name) {
					if (name == 'compare') {
						if (player == event.player) {
							if (event.iwhile > 0) return false;
							return event.card1.name == 'du';
						}
						return event.card2.name == 'du';
					}
					if (event.name != 'equip' && event.name != 'addJudge' && !event.visible) return false;
					var evt = event.getl(player);
					if (!evt || !evt.hs || !evt.hs.filter(function (i) {
						return get.name(i, player) == 'du';
					}).length) return false;
					for (var i of lib.skill.g_du.whiteListFilter) {
						if (i(event, player)) return false;
					}
					return true;
				},
				whiteListFilter: [
					(event) => event.getParent().name == 'g_du_give',
					(event) => event.getParent(3).name == 'guaguliaodu',
					(event) => event.getParent(3).name == 'guagu_delay',
				],
				forced: true,
				popup: false,
				content: function () {
					'step 0'
					if (trigger.delay === false) game.delayx();
					'step 1'
					game.log(player, '触发了', '#g【毒】', '的效果');
					var num = 1;
					if (typeof trigger.getl == 'function') {
						num = trigger.getl(player).hs.filter(function (i) {
							return get.name(i, player) == 'du';
						}).length;
					}
					player.loseHp(num).type = 'du';
				},
			},
			*/
			huogong2: {
			},
			g_du_give: {
				trigger: {
					player: 'gainAfter',
					global: 'phaseBefore',
				},
				audio: 2,
				cardSkill: true,
				direct: true,
				forceaudio: true,
				filter: function (event, player) {
					if (event.name == 'phase') {
						if (game.phaseNumber != 0) return false;
						if (!player._start_cards) return false;
						var hs = player.getCards('h');
						for (var card of player._start_cards) {
							if (get.name(card, player) == 'du' && hs.contains(card)) return true;
						}
					}
					else {
						if (event.getParent().name != 'draw') return false;
						var hs = player.getCards('h');
						for (var card of event.cards) {
							if (get.name(card, player) == 'du' && hs.contains(card)) return true;
						}
					}
					return false;
				},
				content: function () {
					'step 0'
					var hs = player.getCards('h');
					if (trigger.name == 'phase') {
						event.cards = player._start_cards.filter(function (card) {
							return (get.name(card, player) == 'du' && hs.contains(card));
						});
					}
					else {
						event.cards = trigger.cards.filter(function (card) {
							return (get.name(card, player) == 'du' && hs.contains(card));
						});
					}
					if (_status.connectMode) game.broadcastAll(function () { _status.noclearcountdown = true });
					event.given_map = {};
					'step 1'
					player.chooseCardTarget({
						filterCard: function (card) {
							return _status.event.cards.contains(card) && !card.hasGaintag('feichu');
						},
						filterTarget: lib.filter.notMe,
						selectCard: [1, cards.length],
						cards: event.cards,
						prompt: '是否发动【赠毒】？',
						prompt2: '将本次获得的【毒】交给其他角色',
						ai1: function (card) {
							if (!ui.selected.cards.length) return 1;
							return 0;
						},
						ai2: function (target) {
							return -get.attitude(_status.event.player, target);
						},
					});
					'step 2'
					if (result.bool) {
						event.given = true;
						var res = result.cards, target = result.targets[0].playerid;
						player.addGaintag(res, 'du_given');
						cards.removeArray(res);
						if (!event.given_map[target]) event.given_map[target] = [];
						event.given_map[target].addArray(res);
						if (cards.length) event.goto(1);
					}
					else if (!event.given) {
						if (_status.connectMode) {
							game.broadcastAll(function () { delete _status.noclearcountdown });
							game.stopCountChoose();
						}
						event.finish();
					}
					'step 3'
					if (_status.connectMode) {
						game.broadcastAll(function () { delete _status.noclearcountdown });
						game.stopCountChoose();
					}
					var logs = [];
					for (var i in event.given_map) {
						var source = (_status.connectMode ? lib.playerOL : game.playerMap)[i];
						logs.push(source);
						source.gain(event.given_map[i], player, 'give');
					}
					logs.sortBySeat();
					event.next.sort(function (a, b) {
						return lib.sort.seat(a.player, b.player);
					});
					player.logSkill('g_du_give', logs);
					player.removeGaintag('du_given');
				},
				ai: { expose: 0.1 },
			},
			_yongjian_zengyu: {
				enable: 'phaseUse',
				forceLoad: true,
				filter: function (event, player) {
					return player.hasCard((card) => lib.skill._yongjian_zengyu.filterCard(card) && !card.hasGaintag('feichu'), 'h');
				},
				filterCard: function (card) {
					return get.cardtag(card, 'gifts') && !card.hasGaintag('feichu');
				},
				filterTarget: function (card, player, target) {
					if (player == target) return false;
					var card = ui.selected.cards[0];
					if (get.type(card, false) == 'equip') {
						return target.canEquip(card, true);
					}
					return true;
				},
				discard: false,
				lose: false,
				delay: false,
				check: function (card) {
					var player = _status.event.player;
					if (get.cardtag(card, 'gifts') && get.type(card, false) == 'equip' && game.hasPlayer(function (current) {
						return current != player && current.canEquip(card, true) && !current.hasSkillTag('refuseGifts') && get.effect(current, card, player, player) > 0;
					})) return 2;
					if (!player.needsToDiscard()) return 0;
					return 1 + Math.random();
				},
				content: function () {
					'step 0'
					if (event._zengyu_denied) {
						player.$throw(cards[0], 1000);
						player.lose(cards, ui.discardPile, 'visible');
					}
					else {
						if (get.type(cards[0], false) == 'equip') {
							player.$give(cards[0], target, false);
							game.delay(0.5);
							target.equip(cards[0]);
						}
						else {
							target.gain(cards, player, 'give');
							event.finish();
						}
					}
					'step 1'
					game.delayx();
				},
				ai: {
					order: function (item, player) {
						if (player.hasCard(function (card) {
							return get.cardtag(card, 'gifts') && get.type(card, false) == 'equip' && game.hasPlayer(function (current) {
								return current != player && current.canEquip(card, true) && !current.hasSkillTag('refuseGifts') && get.effect(current, card, player, player) > 0;
							});
						}, 'h')) return 7;
						return 0.51;
					},
					result: {
						target: function (player, target) {
							var card = ui.selected.cards[0];
							if (!card || target.hasSkillTag('refuseGifts')) return 0;
							if (get.type(card, false) == 'equip') return get.effect(target, card, target, target);
							if (card.name == 'du') return player.hp > target.hp ? -1 : 0;
							if (target.hasSkillTag('nogain')) return 0;
							return Math.max(1, get.value(card, player) - get.value(card, target));
						},
					},
				},
			},
			_wuxie: {
				trigger: { player: ['useCardToBegin', 'phaseJudge'] },
				priority: 5,
				popup: false,
				forced: true,
				filter: function (event, player) {
					if (event.card.storage && event.card.storage.nowuxie) return false;
					if (event.cancelled) return false;
					var card = event.card;
					if (event.name == 'phaseJudge' && card.viewAs) card = { name: card.viewAs };
					if (event.name == 'phaseJudge' && get.type(card, 'trick') != 'trick') return false;
					var info = get.info(card);
					if (info.wuxieable === false) return false;
					if (event.name != 'phaseJudge') {
						if (event.getParent().nowuxie) return false;
						if (!event.target) {
							if (info.wuxieable) return true;
							return false;
						}
						if (event.player.hasSkillTag('playernowuxie', false, event.card)) return false;
						if (get.type(event.card) != 'trick' && !info.wuxieable) return false;
					}
					return true;
				},
				forceLoad: true,
				content: function () {
					'step 0'
					delete event.wuxieresult;
					delete event.wuxieresult2;
					if (trigger.multitarget) {
						event.targets = trigger.targets;
					}
					event.target = trigger.target;
					if (event.triggername == 'phaseJudge') {
						event.target = trigger.player;
					}
					event.sourcex = event.targets || event.target;
					if (!event.targets && trigger.targets && trigger.targets.length == 1) {
						event.sourcex2 = trigger.player;
					}
					event.source = trigger.player;
					if (event.state == undefined) event.state = true;
					event.card = trigger.card;
					event._global_waiting = true;
					event.tempnowuxie = (trigger.targets && trigger.targets.length > 1 && !trigger.multitarget);
					event.filterCard = function (card, player) {
						if (get.name(card) != 'wuxie') return false;
						return lib.filter.cardEnabled(card, player, 'forceEnable');
					};
					event.send = function (player, state, isJudge, card, source, target, targets, id, id2, tempnowuxie, skillState) {
						if (skillState) {
							player.applySkills(skillState);
						}
						state = state ? 1 : -1;
						var str = '';
						if (isJudge) {
							str += get.translation(source) + '的';
						}
						if (isJudge) {
							str += get.translation(card, 'viewAs');
						}
						else {
							str += get.translation(card);
						}
						if ((targets || target) && !isJudge) {
							str += '对' + get.translation(targets || target);
						}
						str += '将' + (state > 0 ? '生效' : '失效') + '，是否无懈？';

						if (player.isUnderControl(true) && !_status.auto && !ui.tempnowuxie && tempnowuxie) {
							var translation = get.translation(card.name);
							if (translation.length >= 4) {
								translation = lib.translate[card.name + '_ab'] || translation.slice(0, 2);
								if (translation == '超级') translation = '敏感';
							}
							ui.tempnowuxie = ui.create.control('不无懈' + translation, ui.click.tempnowuxie, 'stayleft');
							ui.tempnowuxie._origin = id2;
						}
						var next = player.chooseToUse({
							filterCard: function (card, player) {
								if (get.name(card) != 'wuxie') return false;
								return lib.filter.cardEnabled(card, player, 'forceEnable');
							},
							prompt: str,
							type: 'wuxie',
							state: state,
							_global_waiting: true,
							ai1: function () {
								if (isJudge) {
									var name = card.viewAs || card.name;
									var info = lib.card[name];
									if (info && info.ai && info.ai.wuxie) {
										var aiii = info.ai.wuxie(source, card, source, _status.event.player, state);
										if (typeof aiii == 'number') return aiii;
									}
									if (Math.abs(get.attitude(_status.event.player, source)) < 3) return 0;
									if (source.hasSkillTag('nowuxie_judge') || source.hasSkillTag('guanxing') && (source != player || !source.hasSkill('guanxing_fail'))) return 0;
									if (get.type(name) != 'delay') {
										if (source != _status.event.player) {
											return 0;
										}
									}
									var card2;
									if (name != card.name) {
										card2 = { name: name };
									}
									else {
										card2 = card;
									}
									var eff = get.effect(source, card2, source, source);
									if (eff >= 0) return 0;
									if (name == 'tuqiong' && source.getCards('e', { subtype: 'equip2' })[0] && source.getCards('e', { subtype: 'equip2' })[0].name == 'Ahuasan') return 0;
									var num = get.tag(info, 'delay') == 'good' ? -1 : 1;
									return state * get.attitude(_status.event.player, source) * num;
								}
								else if (target) {
									var triggerevent = _status.event.getTrigger();
									if (triggerevent && triggerevent.parent &&
										triggerevent.parent.postAi &&
										triggerevent.player.isUnknown(_status.event.player)) {
										return 0;
									}
									var info = get.info(card);
									if (info.ai && info.ai.wuxie) {
										var aiii = info.ai.wuxie(target, card, source, _status.event.player, state);
										if (typeof aiii == 'number') return aiii;
									}
									if (info.multitarget && targets) {
										var eff = 0;
										for (var i = 0; i < targets.length; i++) {
											eff += get.effect(targets[i], card, source, _status.event.player)
										}
										return -eff * state;
									}
									if (get.type(card, 'tirck') == 'tirck' && get.tag(card, 'damage') && target.getCards('e', { subtype: 'equip2' })[0] && target.getCards('e', { subtype: 'equip2' })[0].name == 'Ahuasan') return 0;
									if (Math.abs(get.attitude(_status.event.player, target)) < 3) return 0;
									return -get.effect(target, card, source, _status.event.player) * state;
								}
								else {
									var triggerevent = _status.event.getTrigger();
									if (triggerevent && triggerevent.parent &&
										triggerevent.parent.postAi &&
										triggerevent.player.isUnknown(_status.event.player)) {
										return 0;
									}
									var info = get.info(card);
									if (info.ai && info.ai.wuxie) {
										var aiii = info.ai.wuxie(target, card, source, _status.event.player, state);
										if (typeof aiii == 'number') return aiii;
									}
									if (get.type(card, 'tirck') == 'tirck' && get.tag(card, 'damage') && source.getCards('e', { subtype: 'equip2' })[0] && source.getCards('e', { subtype: 'equip2' })[0].name == 'Ahuasan') return 0;
									if (Math.abs(get.attitude(_status.event.player, source)) < 3) return 0;
									return -get.attitude(_status.event.player, source) * state;
								}
							},
							source: target,
							source2: targets,
							id: id,
							id2: id2
						});
						if (event.stateplayer && event.statecard) next.set('respondTo', [event.stateplayer, event.statecard]);
						else if (!isJudge) {
							next.set('respondTo', [source, card]);
						}
						if (game.online) {
							_status.event._resultid = id;
							game.resume();
						}
						else {
							next.nouse = true;
						}
					};
					event.settle = function () {
						if (!event.state) {
							if (event.triggername == 'phaseJudge') {
								trigger.untrigger();
								trigger.cancelled = true;
							}
							else {
								trigger.cancel();
								if (event.guowuxie == true) {
									if (trigger.target.identity != 'ye' && trigger.target.identity != 'unknown') {
										trigger.getParent().excluded.addArray(game.filterPlayer(function (current) {
											return current.identity == trigger.target.identity;
										}));
									}
								}
							}
						}
						event.finish();
					};
					'step 1'
					var list = game.filterPlayer(function (current) {
						if (event.nowuxie) return false;
						if (event.directHit && event.directHit.contains(current)) return false;
						if (event.triggername == 'phaseJudge') {
							if (game.checkMod(trigger.card, player, current, 'unchanged', 'wuxieJudgeEnabled', current) == false) return false;
							if (game.checkMod(trigger.card, player, current, 'unchanged', 'wuxieJudgeRespondable', player) == false) return false;
							if (event.stateplayer && event.statecard && (game.checkMod(event.statecard, event.stateplayer, player, current, 'unchanged', 'wuxieRespondable', event.stateplayer) == false)) return false;
						}
						else {
							if (!event.statecard && trigger.getParent().directHit.contains(current)) return false;
							if (game.checkMod(trigger.card, player, trigger.target, current, 'unchanged', 'wuxieEnabled', current) == false) return false;
							if (game.checkMod(trigger.card, player, trigger.target, current, 'unchanged', 'wuxieRespondable', player) == false) return false;
							if (event.stateplayer && event.statecard && (game.checkMod(event.statecard, event.stateplayer, trigger.player, current, 'unchanged', 'wuxieRespondable', event.stateplayer) == false)) return false;
						}
						return current.hasWuxie();
					});
					event.list = list;
					event.id = get.id();
					list.sort(function (a, b) {
						return get.distance(event.source, a, 'absolute') - get.distance(event.source, b, 'absolute');
					});
					'step 2'
					if (event.list.length == 0) {
						event.settle();
					}
					else if (_status.connectMode && (event.list[0].isOnline() || event.list[0] == game.me)) {
						event.goto(4);
					}
					else {
						event.current = event.list.shift();
						event.send(event.current, event.state, event.triggername == 'phaseJudge',
							event.card, event.source, event.target, event.targets, event.id, trigger.parent.id, event.tempnowuxie);
					}
					'step 3'
					if (result.bool) {
						event.wuxieresult = event.current;
						event.wuxieresult2 = result;
						event.goto(8);
					}
					else {
						event.goto(2);
					}
					'step 4'
					var id = event.id;
					var sendback = function (result, player) {
						if (result && result.id == id && !event.wuxieresult && result.bool) {
							event.wuxieresult = player;
							event.wuxieresult2 = result;
							game.broadcast('cancel', id);
							if (_status.event.id == id && _status.event.name == 'chooseToUse' && _status.paused) {
								return (function () {
									event.resultOL = _status.event.resultOL;
									ui.click.cancel();
									if (ui.confirm) ui.confirm.close();
								});
							}
						}
						else {
							if (_status.event.id == id && _status.event.name == 'chooseToUse' && _status.paused) {
								return (function () {
									event.resultOL = _status.event.resultOL;
								});
							}
						}
					};

					var withme = false;
					var withol = false;
					var list = event.list;
					for (var i = 0; i < list.length; i++) {
						if (list[i].isOnline()) {
							withol = true;
							list[i].wait(sendback);
							list[i].send(event.send, list[i], event.state, event.triggername == 'phaseJudge',
								event.card, event.source, event.target, event.targets, event.id, trigger.parent.id, event.tempnowuxie, get.skillState(list[i]));
							list.splice(i--, 1);
						}
						else if (list[i] == game.me) {
							withme = true;
							event.send(list[i], event.state, event.triggername == 'phaseJudge',
								event.card, event.source, event.target, event.targets, event.id, trigger.parent.id, event.tempnowuxie);
							list.splice(i--, 1);
						}
					}
					if (!withme) {
						event.goto(6);
					}
					if (_status.connectMode) {
						if (withme || withol) {
							for (var i = 0; i < game.players.length; i++) {
								game.players[i].showTimer();
							}
						}
					}
					event.withol = withol;
					'step 5'
					if (result && result.bool && !event.wuxieresult) {
						game.broadcast('cancel', event.id);
						event.wuxieresult = game.me;
						event.wuxieresult2 = result;
					}
					'step 6'
					if (event.withol && !event.resultOL) {
						game.pause();
					}
					'step 7'
					for (var i = 0; i < game.players.length; i++) {
						game.players[i].hideTimer();
					}
					'step 8'
					if (event.wuxieresult && event.wuxieresult2 && event.wuxieresult2.skill) {
						var info = get.info(event.wuxieresult2.skill);
						if (info && info.precontent && !game.online) {
							var next = game.createEvent('pre_' + event.wuxieresult2);
							next.setContent(info.precontent);
							next.set('result', event.wuxieresult2);
							next.set('player', event.wuxieresult);
						}
					}
					'step 9'
					if (event.wuxieresult) {
						var next = event.wuxieresult.useResult(event.wuxieresult2);
						if (event.stateplayer && event.statecard) next.respondTo = [event.stateplayer, event.statecard];
						else if (event.triggername != 'phaseJudge') {
							next.respondTo = [trigger.player, trigger.card];
						}
					}
					'step 10'
					if (event.wuxieresult) {
						if (result.wuxied) {
							event.nowuxie = result.nowuxie;
							event.directHit = result.directHit;
							event.stateplayer = event.wuxieresult;
							if (event.wuxieresult2 && event.wuxieresult2.used) {
								event.statecard = event.wuxieresult2.used;
							}
							else {
								event.statecard = true;
							}
							event.state = !event.state;
							event.goto(1);
						}
						else event.settle();
					}
					else if (event.list.length) {
						event.goto(2);
					}
					else {
						event.settle();
					}
					delete event.resultOL;
					delete event.wuxieresult;
					delete event.wuxieresult2;
				}
			},
			//delayCard_skill
			_yanchi: {
				enable: "phaseUse",
				forceLoad: true,
				filter: function (event, player) {
					return player.hasCard((card) => lib.skill._yanchi.filterCard(card) && !card.hasGaintag('feichu'), 'h');
				},
				filterCard: function (card, player) {
					if (get.cardCanDelay(card, player)) return true;
					return false;
				},
				discard: false,
				lose: false,
				delay: false,
				prompt: '使用一张牌的延时效果',
				check: function (card) {
					if (!game.hasPlayer(function (current) {
						return get.distance(_status.event.player, current, 'attack') <= 1;
					}) && card.name == 'sha') return 0;
					if (!game.hasPlayer(function (current) {
						return get.distance(_status.event.player, current) <= 1;
					}) && card.name == 'shunshou') return 0;
					if (_status.event.player.countCards('h') <= 2 && card.name == 'manzu') return 0;
					if (_status.event.player.storage.jiu && card.name == 'sha') return 0;
					if (get.cardtag(card, 'delay') || get.cardtag(card, 'delay_jiabu') || get.cardtag(card, 'delay_zhifang') || get.cardtag(card, 'delay_xiayu') || get.cardtag(card, 'delay_fengqing') || get.cardtag(card, 'delay_luanchuang')) {
						if (Math.random() > 0.3)
							return 2;
					}

					return 0;
				},
				viewAs: function (cards, player) {
					var name = false;
					var nature = null;
					switch (get.name(cards[0], player)) {
						case 'guohe': name = 'guohe_delay'; break;
						case 'shunshou': name = 'shunshou_delay'; break;
						case 'manzu': name = 'manzu_delay'; break;
						case 'guaguliaodu': name = 'guagu_delay'; break;
						case 'sha': name = 'sha_delay'; nature = cards[0].nature; break;
						case 'tao': name = 'tao_delay'; nature = cards[0].nature; break;
						case 'jiu': name = 'jiu_delay'; break;
						case 'huogong': name = 'huogong_delay'; break;
						case 'pengran': name = 'pengran_delay'; break;
						//		case 'caiming': name = 'caiming_delay'; break;
					}
					if (name) return { name: name, nature: nature, sourcet: player, isCard: true, cards: cards };
					return null;
				},
				ai: {
					order: function (item, player) {
						if (player.hasCard(function (card) {
							return get.cardtag(card, 'delay') || get.cardtag(card, 'delay_jiabu') || get.cardtag(card, 'delay_zhifang') || get.cardtag(card, 'delay_xiayu') || get.cardtag(card, 'delay_fengqing') || get.cardtag(card, 'delay_luanchuang')
						}, 'h')) return 8.5;
						return 0.51;
					},
					result: {
						target: function (player, target) {
							var card = ui.selected.cards[0];
							if (!card) return 0;
							if (card.name == 'tao' || card.name == 'jiu' || card.name == 'manzu' || card.name == 'guagu') return 2;
							return -2;
						},
					},
				},
			},
			//濒死判定
			_delay_dying: {
				popup: false,
				trigger: { player: 'dying' },
				filter: function (event, player) {
					return player.hasCard('guagu_delay', 'j') || player.hasCard('tao_delay', 'j') || player.hasCard('jiu_delay', 'j');
				},
				content: function () {
					player.storage._delay_dying = true;
					player.phaseJudge().set('nocancel', true);
				},
				forced: true,
			},
			_guagu_delay: {
				popup: false,
				forced: true,
			},
			_tao_delay: {
				popup: false,
				forced: true,
			},
			_huogong_delay: {
				popup: false,
				forced: true,
				group: ['_huogong_delay_card'],
				subSkill: {
					"card": {
						sub: true,
						popup: false,
						forced: true,
					}
				}
			},
			_caiming_delay: {
				popup: false,
				forced: true,
				group: ['_caiming_delay_card'],
				subSkill: {
					"card": {
						sub: true,
						popup: false,
						forced: true,
					}
				}
			},
			//delay_sha_Skill
			_shaeffect_delay: {
				trigger: { player: "useCard1" },
				popup: false,
				forced: true,
				filter: function (event, player) {
					var tag = player.storage._shaeffect_delay;
					if (tag == 'delay_jiabu' || tag == 'delay_zhifang' || tag == 'delay_xiayu' || tag == 'delay_fengqing' || tag == 'delay_luanchuang') {
						return true;
					}
					return false;
				},
				content: function () {
				}
			},
			xiayu_delay_skill: {
				trigger: { source: 'damageBegin2' },
				equipSkill: false,
				ruleSkill: true,
				filter: function (event, player) {
					if (!event.card) return false;
					return event.card.storage == 'delay_xiayu' && event.notLink() && event.player.getCards('he').length > 0;
				},
				check: function (event, player) {
					var target = event.player;
					var eff = get.damageEffect(target, player, player, event.nature);
					if (get.attitude(player, target) > 0) {
						if (eff >= 0) return false;
						return true;
					}
					if (eff <= 0) return true;
					if (target.hp == 1) return false;
					if (event.num > 1 || player.hasSkill('tianxianjiu') ||
						player.hasSkill('luoyi2') || player.hasSkill('reluoyi2')) return false;
					if (target.countCards('he') < 2) return false;
					var num = 0;
					var cards = target.getCards('he');
					for (var i = 0; i < cards.length; i++) {
						if (get.value(cards[i]) > 6) num++;
					}
					if (num >= 2) return true;
					return false;
				},
				logTarget: "player",
				content: function () {
					"step 0"
					trigger.cancel();
					"step 1"
					if (trigger.player.countDiscardableCards(player, 'he')) {
						player.line(trigger.player);
						player.discardPlayerCard('he', trigger.player, true);
					}
					"step 2"
					if (trigger.player.countDiscardableCards(player, 'he')) {
						player.line(trigger.player);
						player.discardPlayerCard('he', trigger.player, true);
					}
				}
			},
			zhifang_delay_skill: {
				equipSkill: false,
				trigger: {
					player: 'useCardToPlayered',
				},
				filter: function (event, player) {
					if (!event.card) return false;
					return event.card.name == 'sha' && event.card.storage == 'delay_zhifang';
				},
				forced: true,
				logTarget: 'target',
				content: function () {
					trigger.target.addTempSkill('zhifang_delay2');
					trigger.target.storage.zhifang_delay2.add(trigger.card);
				},
				ai: {
					skillTagFilter: function (player, tag, arg) {
						if (arg && arg.name == 'sha') return true;
						return false;
					}
				}
			},
			zhifang_delay2: {
				firstDo: true,
				ai: { unequip2: true },
				init: function (player, skill) {
					if (!player.storage[skill]) player.storage[skill] = [];
				},
				onremove: true,
				trigger: {
					player: ['damage', 'damageCancelled', 'damageZero'],
					source: ['damage', 'damageCancelled', 'damageZero'],
					target: ['shaMiss', 'useCardToExcluded', 'useCardToEnd'],
					global: ['useCardEnd'],
				},
				charlotte: true,
				filter: function (event, player) {
					return player.storage.zhifang_delay2 && event.card && player.storage.zhifang_delay2.contains(event.card) && (event.name != 'damage' || event.notLink());
				},
				silent: true,
				forced: true,
				popup: false,
				priority: 12,
				content: function () {
					player.storage.zhifang_delay2.remove(trigger.card);
					if (!player.storage.zhifang_delay2.length) player.removeSkill('zhifang_delay2');
				},
			},
			fengqing_delay_skill: {
				trigger: { source: 'damageBegin2' },
				equipSkill: false,
				ruleSkill: true,
				filter: function (event, player) {
					if (!event.card) return false;
					return event.card.storage == 'delay_fengqing' && event.notLink();
				},
				check: function (event, player) {
					return false;
				},
				logTarget: "player",
				content: function () {
					"step 0"
					trigger.nature = null;
					"step 1"
					trigger.player.link();
					"step 2"
				}
			},
			luanchuang_delay_skill: {
				locked: true,
				trigger: { global: 'damageBegin1' },
				priority: 15,
				forced: true,
				preHidden: true,
				filter: function (event, player, name) {
					if (!event.card) return false;
					if (event.card.storage == 'delay_luanchuang' && event.source == player) return true;
					return false;
				},
				content: function () {
					for (var i = 0; i < game.players.length; i++)
						game.players[i].addTempSkill('luanchuang2_delay', 'damageAfter');
					trigger.player.markSkill('luanchuang2_delay');
					delete player.storage._shaeffect_delay;
				}
			},
			luanchuang2_delay: {
				mod: {
					cardSavable: function (card, player, target) {
						if (card.name == 'tao' && target != player) return false;
					},
				},
				marktext: "☹",
				intro: {
					name: "乱创",
					content: function (storage, player, skill) {
						return "你大概率寄了，不如看看小拉乱创<a target='_blank' href='https://www.bilibili.com/video/BV14y4y1M7cC?from=search&seid=6825416902445879984&spm_id_from=333.337.0.0' style='text-decoration:underline;color:green;font-size:16px;'>小拉乱创</a>&nbsp&nbsp";
					},
				},
			},
			//new Card_skill

			_huizhe: {
				trigger: { player: 'phaseJudge' },
				priority: 7,
				popup: false,
				forced: true,
				filter: function (event, player) {
					if (event.card.storage && event.card.storage.nomemghun) return false;
					return true;
				},
				content: function () {
					'step 0'
					target = trigger.player;
					_status.canHuizhe = target;
					var card = trigger.card;
					var str = '';
					str += get.translation(target) + '的';
					str += get.translation(card);
					str += '将生效，是否使用【会者不难】？';

					for (var i = 0; i < game.players.length; i++) {
						if (!game.players[i].hasCard('huizhe') && !game.players[i].hasSkillTag('respondDelay')) continue;
						else {
							game.players[i].chooseToUse({
								prompt: str,
								filterCard: function (card, player) {
									if (get.name(card) != 'huizhe') return false;
									return lib.filter.cardEnabled(card, player);
								},
								ai1: function () {
									var source = _status.event.getTrigger().player;
									var card = _status.event.getTrigger().card;
									var name = card.viewAs || card.name;
									var info = lib.card[name];
									var source = card.source;
									if (Math.abs(get.attitude(_status.event.player, source)) < 3) return 0;
									if (source.hasSkillTag('nowuxie_judge') || source.hasSkillTag('guanxing') && (source != player || !source.hasSkill('guanxing_fail'))) return 0;
									if (get.type(name) != 'delay') {
										if (source != _status.event.player) {
											return 0;
										}
									}
									var card2;
									if (name != card.name) {
										card2 = { name: name };
									}
									else {
										card2 = card;
									}
									var eff = get.effect(player, card2, source, source);
									if (eff >= 0) return 0;
									var num = get.tag(info, 'delay') == 'good' ? -1 : 1;
									return get.attitude(_status.event.player, player) * num;
								},
								source: target,
							}).set('huizhe', true);
						}

					}
					'step 1'
					if (_status.huizhe) {
						game.log(trigger.card, '的效果被取消了');
						trigger.untrigger();
						trigger.cancelled = true;
						delete _status.huizhe;
						delete _status.canHuizhe;
						event.finish();
					}
					else {
						delete _status.canHuizhe;
						delete _status.huizhe;
					}
				}
			},
			/*_huizhe2: {
				trigger: { player: "useCardBefore" },
				popup: false,
				forced: true,
				filter: function (event, player) {
					if (event.card.name == 'huizhe' && event.getParent().huizhe) return true;
					return false;
				},
				content: function () {
					_status.huizhe = true;
				}
			},
				_menghun: {
					trigger: { player: 'phaseJudge' },
					priority: 7,
					popup: false,
					forced: true,
					filter: function (event, player) {
						if (event.card.storage && event.card.storage.nomemghun) return false;
						return true;
					},
					content: function () {
						'step 0'
						target = trigger.player;
						var card = trigger.card;
						var str = '';
						str += get.translation(target) + '的';
						str += get.translation(card);
						str += '将生效，是否使用【萌混过关】？';
	
						for (var i = 0; i < game.players.length; i++) {
							if (!game.players[i].hasCard('menghun')) continue;
							else {
								game.players[i].chooseToUse({
									filterCard: function (card, player) {
										if (get.name(card) != 'menghun') return false;
										return lib.filter.cardEnabled(card, player, 'forceEnable');
									},
									prompt: str,
									ai1: function () {
										var source=event.getTrigger().player;
										var name = card.viewAs || card.name;
										var info = lib.card[name];
										var source=card.source;
										if (Math.abs(get.attitude(_status.event.player, source)) < 3) return 0;
										if (source.hasSkillTag('nowuxie_judge') || source.hasSkillTag('guanxing') && (source != player || !source.hasSkill('guanxing_fail'))) return 0;
										if (get.type(name) != 'delay') {
											if (source != _status.event.player) {
												return 0;
											}
										}
										var card2;
										if (name != card.name) {
											card2 = { name: name };
										}
										else {
											card2 = card;
										}
										var eff = get.effect(source, card2, source, source);
										if (eff >= 0) return 0;
										var num = get.tag(info, 'delay') == 'good' ? -1 : 1;
										return get.attitude(_status.event.player, source)*num;
									},
									source: target,
								});
							}
	
						}
						'step 1'
						if (result.bool && _status.menghun) {
							trigger.untrigger();
							trigger.cancelled = true;
							event.finish();
							delete _status.menghun;
						}
					}
				},*/
			_tuqiong: {
				trigger: { player: "useCard" },
				popup: false,
				forced: true,
				filter: function (event, player) {
					if (get.name(event.card) == 'tuqiong') return true;
					return false;
				},
				content: function () {
					var list = [];
					list.push(player);
					for (var i = 0; i < trigger.targets.length; i++) {
						list.push(trigger.targets[i]);
						delete trigger.targets[i].storage._tuqiong;
						trigger.targets[i].storage._tuqiong = player;
					}
					game.delayx();
					game.asyncDraw(list);
				},
			},
			_tufa: {
				trigger: { player: "useCardEnd" },
				popup: false,
				forced: true,
				filter: function (event, player) {
					if (get.name(event.card) != 'tufa') return false;
					if (player.storage._tufa) return true;
					return false;
				},
				content: function () {
					delete player.storage._tufa;
					player.damage(1, 'fire', 'nosource', 'nocard');
				},
			},
			_mingan: {
			},
			wudou1: {
				trigger: { source: 'damageBegin2' },
				forced: true,
				popup: false,
				priority: 15,
				locked: true,
				preHidden: true,
				filter: function (event, player) {
					return player.hasSkill('wudou1') && player.storage.wudou1 == true;
				},
				content: function () {
					player.storage.wudou1 = false;
				},
				mod: {
					targetInRange: function (card, player, target) {
						return true;
					},
					cardUsableTarget: function (card, player, target) {
						return true;
					},
					cardEnabled2: function (card, player) {
						return 'unchanged';
					},
				},
			},
			wudou2: {
				mod: {
					targetEnabled: function (card, player, target, now) {
						if (player.hasSkill('wudou1')) return false;
					}
				},
			},
			//new Skill for equip
			'Atiegun_skill': {
				equipSkill: true,
				trigger: { player: 'useCardToPlayered' },
				audio: true,
				logTarget: 'target',
				filter: function (event, player) {
					if (event.card.name != 'sha' || event.card.storage == 'delay_jiabu' || event.card.storage == 'delay_zhifang' || event.card.storage == 'delay_xiayu' || event.card.storage == 'delay_fengqing' || event.card.storage == 'delay_luanchuang' || event.card.storage == 'delay') return false;
					return true;
				},
				direct: true,
				content: function () {
					"step 0"
					player.chooseToDiscard('弃置一张手牌，根据其花色发动【杀】的额外效果', false).set('ai', function (card) {
						var target = trigger.target;
						var player = trigger.player;
						if (get.attitude(player, target) > 0) return false;
						if (get.suit(card) == 'heart') {
							if (target.hp <= 1 && target.mayHaveShan()) return 10 - get.value(card);
							return 5 - get.value(card);
						}
						if (get.suit(card) == 'diamond') {
							if (target.countCards('he') < 2) return false;
							var eff = get.damageEffect(target, player, player, event.nature);
							if (eff > 0) return false;
							var cards = target.getCards('he');
							var num = 0;
							for (var i = 0; i < cards.length; i++) {
								if (get.value(cards[i]) > 6) num++;

							}
							return 3 + num * 1.2 - eff - get.value(card);
						}
						if (get.suit(card) == 'club') {
							if (!trigger.card.nature) return false;
							if (game.hasPlayer(function (current) {
								return get.attitude(player, current) <= -1 && current != target && !current.isLinked();
							})) {
								if (get.nature(card) == null)
									return 7 - get.value(card);
								else
									return 3 - get.value(card);
							}
						}
						if (get.suit(card) == 'spade') {
							if (!player.getCards('e', { subtype: 'equip2' }).length) return false;
							var eq = player.getCards('e', { subtype: 'equip2' });
							if (eq.name == 'tengjia' && _status.event.card.nature == 'fire') return false;
							if (eq.name == 'yinfengyi') return false;
							return 7 - get.value(card);
						}
						return false;
					});
					"step 1"
					if (result.bool == true) {
						if (get.suit(result.cards[0]) == 'heart') {
							player.storage._shaeffect_delay = 'delay_jiabu';
						}
						else if (get.suit(result.cards[0]) == 'diamond') {
							trigger.card.storage = 'delay_xiayu';
						}
						else if (get.suit(result.cards[0]) == 'club') {
							trigger.card.storage = 'delay_fengqing';
						}
						else if (get.suit(result.cards[0]) == 'spade') {
							trigger.card.storage = 'delay_zhifang';
						}
					}
				}
			},
			/*'Ashanzi_skill': {
				equipSkill: true,
				audio: 'Ashanzi',
				firstDo: true,

				trigger: { player: 'useCard1' },
				forced: true,
				group: ['Ashanzi2'],
				filter: function (event, player) {
					return event.card.name == 'sha' && event.getParent().type == 'phase';
				},
				content: function () {
					trigger.audioed = true;
					if (!player.storage.Ashanzi_skill)
						player.storage.Ashanzi_skill = [];
					if (!player.storage.Ashanzi_skill.contains(get.suit(trigger.card))) {
						player.storage.Ashanzi_skill.push(get.suit(trigger.card));
					}
				},
				mod: {
					cardEnabled: function (card, player) {
						if (!player.storage.Ashanzi_skill) {
							player.storage.Ashanzi_skill = [];
							if (player.usedCardSuit('sha', ['heart'])) player.storage.Ashanzi_skill.push('heart');
							if (player.usedCardSuit('sha', ['diamond'])) player.storage.Ashanzi_skill.push('diamond');
							if (player.usedCardSuit('sha', ['club'])) player.storage.Ashanzi_skill.push('club');
							if (player.usedCardSuit('sha', ['spade'])) player.storage.Ashanzi_skill.push('spade');
						}
						if (card.name == 'sha' && player.storage.Ashanzi_skill.contains(get.suit(card))) return false;
					},
					cardUsable: function (card, player) {
						if (!player.storage.Ashanzi_skill) {
							player.storage.Ashanzi_skill = [];
							if (player.usedCardSuit('sha', ['heart'])) player.storage.Ashanzi_skill.push('heart');
							if (player.usedCardSuit('sha', ['diamond'])) player.storage.Ashanzi_skill.push('diamond');
							if (player.usedCardSuit('sha', ['club'])) player.storage.Ashanzi_skill.push('club');
							if (player.usedCardSuit('sha', ['spade'])) player.storage.Ashanzi_skill.push('spade');
						}
						if (card.name == 'sha')
							return player.storage.Ashanzi_skill.length + 1;
					},
				},

			},
			'Ashanzi2': {
				forced: true,
				popup: false,
				trigger: { player: ['phaseEnd'] },
				content: function () {
					delete player.storage.Ashanzi_skill;
				},
			},*/
			Ashanzi_skill: {
				trigger: { player: 'useCardToPlayered' },
				forced: true,
				equipSkill: true,
				audio: true,
				filter: function (event, player) {
					return event.card.name == 'sha';
				},
				logTarget: 'target',
				content: function () {
					var target = trigger.target;
					if (!target.isLinked()) target.link();
					else trigger.card.nature = 'thunder';
				},
			},

			'Ashoubing_skill': {
				forced: true,
				popup: false,
				equipSkill: false,
				trigger: { player: 'useCard' },
				filter: function (event, player) {
					return event.card.name == 'sha';
				},
				content: function () {
					'step 0'
					trigger.cancel();
					event.cnt=0;
					'step 1'
					event.cnt++;
					event.cards = get.cards(3);
					player.showCards(event.cards);
					'step 2'
					game.delay();
					'step 3'
					player.chooseButton(['请选择一张牌使用', event.cards]).set('filterButton', function (button) {
						if (button.link.name == 'tao' && player.hp == player.maxHp) return false;
						if (button.link.name == 'guaguliaodu' && !game.hasPlayer((function (current) {
							return current.hp != current.maxHp;
						}))) return false;
						if (button.link.name == 'shan' || button.link.name == 'wuxie') return false;
						if (button.link.name == 'huizhe' && !game.hasPlayer((function (current) {
							return current.getCanhuizhecards();
						}))) return false;
						return true;
						/*			var cards = _status.event.cards;
									for (var i = 0; i < cards.length; i++)
										if (button.link != cards[i] && get.name(cards[i]) == ['shan', 'wuxie', 'menghun'])
											return false;
										else if (button.link != cards[i] && get.name(cards[i]) == ['tao', 'guagu']) {
											if (get.name(cards[i]) == 'tao' && player.hp == player.maxHp) return false;
											if (get.name(cards[i]) == 'guagu' && !game.hasPlayer((function (current) {
												return current.hp != current.maxHp;
											}))) return false;
										}
									return true;*/
					}).set('ai', function (button) {
						return get.value(button.link);
					});
					'step 4'
					var yes = false;
					for (var i = event.cards.length - 1; i >= 0; i--) {
						if (result.bool && result.links.contains(event.cards[i])) {
							if (event.cards[i].name == 'sha') {
								game.log('#b' + get.translation(player), '使用了', '#y' + get.translation(event.cards[i]));
								yes = true;
							}

							else
								player.chooseUseTarget(event.cards[i], false);

						}
						else {
							event.cards[i].fix();
							ui.cardPile.insertBefore(event.cards[i], ui.cardPile.childNodes[0]);
						}
					}
					if (yes == true)
						event.goto(1);
					'step 5'
					//向晚4
					if (player.name == 'xiangwan'&&event.cnt>=3) {
						player.checkChallenge(event, 'CLxiangwan4', 'character', 'onehun');
					}

					game.updateRoundNumber();
				},
			},
			'Ahuasan_skill': {
				forced: true,
				audio: 'Ahuasan',
				equipSkill: true,
				trigger: { player: 'damageBegin4' },
				filter: function (event, player) {
					if (player.hasSkillTag('unequip2')) return false;
					if (event.source && event.source.hasSkillTag('unequip', false, {
						name: event.card ? event.card.name : null,
						target: player,
						card: event.card
					})) return false;
					//		if (event.getParent().name == '_tufa') return true;
					if (event.card) {
						var name = event.card.viewAs || event.card.name;
						if (get.type(name, 'trick') == 'trick') return true;
					}
					return false;
				},
				content: function () {
					trigger.cancel();
				},
				ai: {
					effect: {
						target: function (card, player, target) {
							if (target.hasSkillTag('unequip2')) return;
							if (player.hasSkillTag('unequip', false, {
								name: card ? card.name : null,
								target: target,
								card: card
							}) || player.hasSkillTag('unequip_ai', false, {
								name: card ? card.name : null,
								target: target,
								card: card
							})) return;
							if (get.type(card, 'tirck') == 'tirck' && get.tag(card, 'damage')) return 'zerotarget';
						}
					}
				}
			},
			'Abinggan_skill': {
				equipSkill: true,
				enable: 'phaseUse',
				usable: 1,
				filterCard: function (card) {
					return get.suit(card) == 'heart' && card.name != 'Abinggan';
				},
				filterTarget: function (card, player, target) {
					return target == player && lib.filter.judge(card, player, target);
				},
				selectCard: 1,
				position: 'hes',
				viewAs: { name: 'tao_delay' },
				filter: function (event, player) {
					return player.countCards('hes', { suit: 'heart' });
				},
				audio: true,
				prompt: '将一张红桃牌当桃对自己延迟使用',
				check: function (card) {
					if (card.name == 'tao') return 0;
					if (player.hp < player.maxHp)
						return 9 - get.value(card);
					else return 6 - get.value(card);
				},
				ai: {
					skillTagFilter: function (player) {
						return player.countCards('hes', { suit: 'heart' });
					},
				}
			},
			'Amanniu_skill': {
				equipSkill: true,
				forced: true,
				trigger: { player: 'useCard' },
				audio: 'Amanniu',
				filter: function (event, player) {
					return !event.audioed && player.countUsed('sha', true) == 1 && event.card && event.card.name == 'sha' && event.getParent().type == 'phase';
				},
				content: function () {
					if (get.color(trigger.card) == 'red')
						trigger.audioed = true;
					player.storage.Amanniu = true;
				},
				mod: {
					cardname: function (card, player, name) {
						if (get.color(card) == 'red' && !player.storage.Amanniu && _status.event.getParent().name == 'phaseUse') {
							return 'sha';
						}
					},
					cardnature: function (card, player) {
						if (get.color(card) == 'red' && !player.storage.Amanniu && _status.event.getParent().name == 'phaseUse') return false;
					},
				},
			},
			Amanniu_equip: {
				trigger: { player: 'equipAfter' },
				forced: true,
				equipSkill: true,
				filter: function (event, player) {
					return player.hasHistory('useCard', function (evt) {
						return evt.card.name == 'sha';
					})
				},
				content: function () {
					player.storage.Amanniu = true;
				},
			},
			Amanniu_clear: {
				trigger: { player: 'phaseUseEnd' },
				forced: true,
				equipSkill: true,
				content: function () {
					delete player.storage.Amanniu;
				},
			},
			'Ayangtuo_skill': {
				trigger: { player: 'addJudgeEnd' },
				forced: true,
				equipSkill: true,
				audio: 'Ayangtuo',
				filter: function (event, player) {
					var cards = player.getCards('j', function (card) {
						return card.name == event.card.name && lib.filter.cardDiscardable(card, player);
					});
					if (!cards.length) return false;
					return event.player == player;
				},
				content: function () {

					var cards = player.getCards('j', function (card) {
						return card.name == trigger.card.name && lib.filter.cardDiscardable(card, player);
					});
					if (cards.length) player.discard(cards);
					game.log(player, '的羊驼把事情糊弄了');
				},
				ai: {
					effect: {
						target: function (card, player, target) {
							if (get.type(card) == 'delay') return 0;
							return 1;
						},
					},
				}
			},
			Azhijiangstar_skill: {
				trigger: { player: 'equipAfter' },
				forced: true,
				equipSkill: true,
				filter: function (event, player) {
					return event.card.name == 'Azhijiangstar' && player.hasCard(function (card) {
						return card != event.card;
					}, 'he');
				},
				content: function () {
					'step 0'
					player.chooseCard('he', '将一张牌置于牌堆顶', true, function (card) {
						var trigger = _status.event.getTrigger();
						console.log(trigger);
						return card != trigger.cards[0];
					}).set('ai', function (card) {
						return 7 - get.value(card);
					});
					'step 1'
					if (result.bool) {
						var cards = result.cards;
						game.log(player, '将', cards, '置于了牌堆顶');
						player.lose(cards);
						while (cards.length) ui.cardPile.insertBefore(cards.pop().fix(), ui.cardPile.firstChild);
						game.updateRoundNumber();
					}
				},
			},
			/*'Azhijiangstar_skill': {
				trigger: { player: ['phaseBegin','phaseEnd'] },
				filter: function (event, player) {
					return true;
				},
				equipSkill: true,
				audio: 'Azhijiangstar',
				content: function () {
					'step 0'
					var list = [];
					list.push('将此装备牌移动到一名其他角色的装备区里，然后你摸一张牌');
					if (player.countCards('hs') > 0) list.push('将任意张手牌置于牌堆顶');
					player.chooseControlList('选择一项：', list, function (event, player) {
						var judges = player.getCards('j');
						var cards = player.getCards('h');
						var num = 0;
						if (judges.length > 0 && cards.length > 0) {
							for (var i = 0; i < judges.length; i++) {
								if (get.effect(player, judges[i], player) < 0) {
									var judgea = get.judge(judges[i]);
									if (!judgea) continue;
									for (var j = 0; j < cards.length; j++) {
										var result = judgea(cards[j]) - judgea(judges[i]);
										if (result == 0) num = Math.max(num, 0);
										else num = Math.max(num, result - get.value(cards[j]) / 2);
									}
									if (num <= 0) break;
								}
								else break;
							}
							if (num > 0) return 1;
						}
						else if (game.hasPlayer(function (current) {
							return get.attitude(event.player, current) >= 0;
						})) return 0;
						return false;
					});
					'step 1'
					if (result.index == 1) {
						event.yes = [];
						player.chooseCard('h', [1, Infinity], '将任意张牌置于牌堆顶', true).set('ai', function (card) {
							var player = _status.event.player;
							var judges = player.getCards('j');
							if (ui.selected.cards.length == judges.length) return false;
							if (judges.length == 0) return false;
							for (var i = 0; i < judges.length; i++) {
								if (event.yes.contains(judges[i])) continue;
								if (get.effect(player, judges[i], player) < 0) {
									var judgea = get.judge(judges[i]);
									var result = judgea(card) - judgea(judges[i]);
									if (result == 0) return 0;
									if ((result - get.value(card) / 2) > 0) event.yes.push(judges[i]);
									return result - get.value(card) / 2;
								}
								else break;
								return false;
							}
						});
					}
					else if (result.index == 0) {
						player.chooseTarget("将此装备牌移动到一名其他角色的装备区里", true, function (card, player, target) {
							if (player != target && target.canEquip(event.card, true)) return true;
							return false;
						}).ai = function (target) {
							var num = 0;
							if (get.attitude(event.player, target) < 0) return false;
							num = get.attitude(event.player, target);
							num += target.countCards('j');
							return num;
						};
					}
					'step 2'
					if (result.bool && result.cards.length) {
						console.log(result.cards);
						player.lose(result.cards, ui.cardPile, 'visible', 'insert');
						player.$throw(result.cards, 1000);
					}
					else if (result.bool && result.targets.length) {
						var card = player.getCards('e', { subtype: 'equip5' });
						result.targets[0].equip(card[0]);
						player.draw();
					}
				}
			},*/
			'Ajiutong_skill': {
				equipSkill: true,
				enable: 'phaseUse',
				usable: 1,
				filterCard: function (card) {
					return get.suit(card) == 'spade' && card.name != 'Ajiutong';
				},
				filterTarget: function (card, player, target) {
					return target == player && lib.filter.judge(card, player, target);
				},
				selectCard: 1,
				position: 'hes',
				viewAs: { name: 'jiu_delay' },
				filter: function (event, player) {
					return player.countCards('hes', { suit: 'spade' });
				},
				audio: true,
				prompt: '将一张黑桃牌当酒对自己延迟使用',
				check: function (card) {
					if (card.name == 'jiu') return 0;
					if (_status.event.player.hp == 1)
						return 9 - get.value(card);
					else return 5 - get.value(card);
				},
				ai: {
					skillTagFilter: function (player) {
						return player.countCards('hes', { suit: 'spade' });
					},
				}
			},

			//oldCard
			'tengjia_new': {
				forced: true,
				audio: 'tengjia',
				equipSkill: true,
				trigger: { player: 'damageBegin4' },
				filter: function (event, player) {
					if (event.nature && event.nature != 'stab') return false;
					if (player.hasSkillTag('unequip2')) return false;
					if (event.source && event.source.hasSkillTag('unequip', false, {
						name: event.card ? event.card.name : null,
						target: player,
						card: event.card
					})) return false;
					return true;
				},
				content: function () {
					trigger.num--;
				},
				ai: {
					effect: {
						target: function (card, player, target, current) {
							if (target.hasSkillTag('unequip2')) return;
							if (player.hasSkillTag('unequip', false, {
								name: card ? card.name : null,
								target: target,
								card: card
							}) || player.hasSkillTag('unequip_ai', false, {
								name: card ? card.name : null,
								target: target,
								card: card
							})) return;
							if (get.tag(card, 'damage') == 1 && (!get.tag(card, 'fireDamage') || !get.tag(card, 'thunderDamage') || !get.tag(card, 'natureDamage'))) return 0;
							var equip1 = player.getEquip(1);
							if (equip1 && equip1.name == 'zhuque') return 1.9;
							return 0.5;
						}
					}
				}
			},
			'serafuku_new1': {
				equipSkill: true,
				forced: true,
				audio: 'serafuku',
				trigger: { player: 'phaseUseBegin' },
				filter: function (event, player) {
					if (!player.hasSex('male')) return false;
					return true;
				},
				content: function () {
					//	player.chooseUseTarget({ name: 'tufa' }, true, 'noTargetDelay', 'nodelayx');
					'step 0'
					player.judge(function (card) {
						if (get.color(card) == 'red') return -2;
						return 0;
					});
					'step 1'
					if (result.color == 'red') {
						player.damage(1, 'fire');
					}
				}
			},
			'serafuku_new2': {
				equipSkill: true,
				trigger: { target: 'shaBegin' },
				forced: true,
				priority: 6,
				audio: 'serafuku',
				filter: function (event, player) {
					if (!player.hasSex('female')) return false;
					if (player.hasSkillTag('unequip2')) return false;
					if (event.player.hasSkillTag('unequip', false, {
						name: event.card ? event.card.name : null,
						target: player,
						card: event.card
					})) return false;
					return (event.card.name == 'sha' && get.color(event.card) == 'black')
				},
				content: function () {
					trigger.cancel();
				},
				ai: {
					effect: {
						target: function (card, player, target) {
							if (target.hasSkillTag('unequip2')) return;
							if (player.hasSkillTag('unequip', false, {
								name: card ? card.name : null,
								target: target,
								card: card
							}) || player.hasSkillTag('unequip_ai', false, {
								name: card ? card.name : null,
								target: target,
								card: card
							})) return;
							if (card.name == 'sha' && get.color(card) == 'black') return 'zerotarget';
						}
					}
				}
			}
		},

		translate: {
			sha: '杀',
			huosha: '火杀',
			leisha: '雷杀',
			cisha: '刺杀',
			shan: '闪',
			tao: '桃',
			bagua: '八卦阵',
			bagua_bg: '卦',
			bagua_skill: '八卦阵',
			dilu: '的卢',
			zhuahuang: '爪黄飞电',
			dilu_bg: '+马',
			zhuahuang_bg: '+马',
			chitu: '赤兔',
			chitu_bg: '-马',
			dawan: '大宛',
			dawan_bg: '-马',
			zhuge: '诸葛连弩',
			cixiong: '雌雄双股剑',
			zhuge_bg: '弩',
			cixiong_bg: '双',
			zhangba: '丈八蛇矛',
			zhangba_bg: '蛇',
			guanshi: '贯石斧',
			zhuge_skill: '诸葛连弩',
			cixiong_skill: '雌雄双股剑',
			zhangba_skill: '丈八蛇矛',
			guanshi_skill: '贯石斧',
			wugu: '五谷丰登',
			taoyuan: '桃园结义',
			nanman: '南蛮入侵',
			wanjian: '万箭齐发',
			manzu: '延迟满足',
			juedou: '决斗',
			wugu_bg: '谷',
			taoyuan_bg: '园',
			nanman_bg: '蛮',
			wanjian_bg: '箭',
			manzu_bg: '满',
			juedou_bg: '斗',
			shunshou: '顺手牵羊',
			guohe: '过河拆桥',
			guohe_bg: '拆',
			jiedao: '借刀杀人',
			wuxie: '无懈可击',
			wuxie_bg: '懈',
			lebu: '乐不思蜀',
			shandian: '闪电',
			shandian_bg: '电',
			hanbing_info: '当你使用杀造成伤害时，你可以防止此伤害，改为依次弃置目标角色的两张牌。',
			hanbing_skill_info: '当你使用杀造成伤害时，你可以防止此伤害，改为依次弃置目标角色的两张牌。',
			sha_info: '出牌阶段，对你攻击范围内的一名角色使用。（出牌阶段限一次）其须使用一张【闪】，否则你对其造成1点伤害。',
			shan_info: '抵消一张【杀】。',
			tao_info: '出牌阶段对自己使用，或一名角色濒死阶段对其使用，目标角色回复一点体力。',
			bagua_info: '当你需要使用或打出一张【闪】时，你可以进行一次判定，若判定结果为红色，视为你使用或打出了一张【闪】。',
			bagua_skill_info: '当你需要使用或打出一张【闪】时，你可以进行一次判定，若判定结果为红色，视为你使用或打出了一张【闪】。',
			dilu_info: '锁定技，其他角色计算与你的距离+1。',
			zhuahuang_info: '锁定技，其他角色计算与你的距离+1。',
			chitu_info: '锁定技，你计算与其他角色的距离-1。',
			dawan_info: '锁定技，你计算与其他角色的距离-1。',
			zhuge_skill_info: '锁定技，你于出牌阶段内使用【杀】无次数限制。',
			zhuge_info: '锁定技，你于出牌阶段内使用【杀】无次数限制。',
			cixiong_skill_info: '当你使用【杀】指定一名异性的目标角色后，你可以令其选择一项：1.弃置一张手牌；2.令你摸一张牌。',
			cixiong_info: '当你使用【杀】指定一名异性的目标角色后，你可以令其选择一项：1.弃置一张手牌；2.令你摸一张牌。',
			zhangba_skill_info: '你可以将两张手牌当【杀】使用或打出。',
			zhangba_info: '你可以将两张手牌当【杀】使用或打出。',
			guanshi_skill_info: '当你使用的【杀】被目标角色使用的【闪】抵消时，你可以弃置两张牌，令此【杀】依然对其造成伤害。',
			guanshi_info: '当你使用的【杀】被目标角色使用的【闪】抵消时，你可以弃置两张牌，令此【杀】依然对其造成伤害。',
			wugu_info: '出牌阶段，对所有角色使用。你从牌堆亮出等同于现存角色数量的牌，目标角色依次选择并获得其中的一张。',
			taoyuan_info: '出牌阶段，对所有角色使用。每名目标角色回复1点体力。',
			nanman_info: '出牌阶段，对所有其他角色使用。每名目标角色需打出一张【杀】，否则受到1点伤害。',
			wanjian_info: '出牌阶段，对所有其他角色使用。每名目标角色需打出一张【闪】，否则受到1点伤害。',
			manzu_info: '出牌阶段，对你使用。你摸两张牌。',
			juedou_info: '出牌阶段，对一名其他角色使用。由其开始，其与你轮流打出一张【杀】，直到其中一方未打出【杀】为止。未打出【杀】的一方受到另一方对其造成的1点伤害。',
			shunshou_info: '出牌阶段，对距离为1且区域里有牌的一名其他角色使用。你获得其区域里的一张牌。',
			guohe_info: '出牌阶段，对区域里有牌的一名其他角色使用。你弃置其区域里的一张牌。',
			jiedao_info: '出牌阶段，对装备区里有武器牌且有使用【杀】的目标的一名其他角色使用。令其对你指定的一名角色使用一张【杀】，否则将其装备区里的武器牌交给你。',
			jiedao_append: '<span class="text" style="font-family: fulu">这是一种十分含蓄的计谋。</span>',
			wuxie_info: '一张锦囊牌生效前，对此牌使用。抵消此牌对一名角色产生的效果，或抵消另一张【无懈可击】产生的效果。',
			lebu_info: '出牌阶段，对一名其他角色使用。若判定结果不为红桃，跳过其出牌阶段。',
			shandian_info: '出牌阶段，对自己使用。若判定结果为黑桃2~9，则目标角色受到3点雷电伤害。若判定不为黑桃2~9，将之移动到下家的判定区里。',
			gifts_tag: '赠',
			du: '毒',
			du_info: '当此牌正面向上离开你的手牌区，或作为你的拼点牌而亮出时，你失去1点体力；当你因摸牌或分发起始手牌而获得【毒】后，你可将其正面交给其他角色（防止【毒】的体力流失）。',
			g_du: '毒',
			g_du_give: '赠毒',
			du_given: '已分配',
			guaguliaodu: '刮骨疗毒',
			guaguliaodu_info: '出牌阶段，对一名已受伤的角色使用。目标角色回复1点体力，然后其可以弃置一张【毒】（防止【毒】的体力流失）。',
			shushangkaihua: '树上开花',
			shushangkaihua_info: '出牌阶段，对你使用。弃置一至两张牌，然后摸等量的牌。若其以此法弃置了装备牌，则多摸一张牌。',
			chenghuodajie: '趁火打劫',
			chenghuodajie_info: '出牌阶段，对一名有手牌的其他角色使用。你展示其一张手牌，然后令其选择一项：①将此牌交给你。②你对其造成1点伤害。',
			tuixinzhifu: '推心置腹',
			tuixinzhifu_info: '出牌阶段，对一名距离为1的其他角色使用。你获得其区域内的至多两张牌，然后交给其等量的手牌。',
			yitianjian: '倚天剑',
			yitianjian_info: '当你因执行【杀】的效果而造成伤害后，若你已受伤，则你可弃置一张手牌，然后回复1点体力。',
			qixingbaodao: '七星宝刀',
			qixingbaodao_info: '锁定技，当此牌进入你的装备区后，你弃置装备区和判定区内的所有其他牌。',
			duanjian: '折戟',
			duanjian_info: '这是一把坏掉的武器…',
			duanjian_append: '<span class="text" style="font-family: fulu">不要因为手快而装给自己。</span>',
			//	serafuku: '水手服',
			//	serafuku_info: '锁定技。当你成为【杀】的目标后，若你的性别包含男性，则你进行判定：若结果为黑色，则此牌对你的伤害值基数+1。',
			//	serafuku_append: '<span class="text" style="font-family: fulu">セーラー服だからです、<br>结论！ </span>',
			'serafuku': '女装',
			'serafuku_info': '锁定技，若你为男性角色，出牌阶段开始时，你进行判定，若结果为红色，你受到1点火焰伤害；若你为女性角色，黑色的【杀】对你无效。',
			'serafuku_new1': '女装',
			'serafuku_new2': '女装',
			yinfengyi: '引蜂衣',
			yinfengyi_info: '锁定技，当你受到雷电伤害时，此伤害+1；当你因【毒】而失去体力时，失去体力的值+1。',
			yonglv: '驽马',
			yonglv_info: '锁定技，其他角色至你的距离视为1。',
			zhanxiang: '战象',
			zhanxiang_info: '锁定技，当你成为“赠予”的目标后，你将此次赠予的效果改为“将赠予牌移动至弃牌堆”。',
			xinge: '信鸽',
			xinge_info: '出牌阶段限一次，你可以将一张牌交给一名其他角色。',
			xinge_append: '<span class="text" style="font-family: fulu">咕咕咕。</span>',

			_yongjian_zengyu: '赠予',
			_yongjian_zengyu_info: '出牌阶段，你可将一张带有“赠予”标记的手牌区装备牌置于一名其他角色的装备区内，或将一张带有“赠予”标记的手牌区非装备牌正面朝上交给一名其他角色。',

			jiu: '酒',
			jiu_info: '出牌阶段，对自己使用，令自己的下一张使用的【杀】造成的伤害+1（每回合限一次）；濒死阶段，对自己使用，回复1点体力',
			huogong: '火攻',
			tiesuo: '铁索连环',
			tiesuo_info: '出牌阶段使用，选择1至2个角色，分别横置或重置这些角色',
			huogong_bg: '攻',
			huogong_info: '目标角色展示一张手牌，然后若你能弃掉一张与所展示牌相同花色的手牌，则火攻对该角色造成1点火焰伤害。',
			tiesuo_bg: '索',
			bingliang: '兵粮寸断',
			hualiu: '骅骝',
			zhuque: '朱雀羽扇',
			bingliang_bg: '粮',
			bingliang_info: '出牌阶段，对距离为1的一名其他角色使用。若判定结果不为梅花，则跳过该角色的摸牌阶段。',
			hualiu_bg: '+马',
			hualiu_info: '你的防御距离+1',
			zhuque_bg: '扇',
			zhuque_skill: '朱雀羽扇',
			zhuque_info: '你可以将一张普通【杀】当具火焰伤害的【杀】使用。',
			guding: '古锭刀',
			guding_info: '锁定技，当你使用【杀】对目标角色造成伤害时，若其没有手牌，此伤害+1。',
			guding_skill: '古锭刀',
			tengjia: '藤甲',
			//	tengjia_info: '锁定技，【南蛮入侵】、【万箭齐发】和普通【杀】对你无效。当你受到火焰伤害时，该伤害+1。',
			tengjia_info: '锁定技，当你受到非属性伤害时，该伤害值-1。当你受到火焰伤害时，该伤害值+1。',
			//	tengjia1: '藤甲',
			tengjia2: '藤甲',
			'tengjia_new': '藤甲',
			//	tengjia3: '藤甲',
			baiyin: '白银狮子',
			baiyin_info: '锁定技，你每次受到伤害时，最多承受1点伤害（防止多余的伤害）；当你失去装备区里的【白银狮子】时，你回复1点体力。',
			baiyin_skill: '白银狮子',

			muniu: '木牛流马',
			muniu_bg: '牛',
			muniu_skill: '木牛',
			muniu_skill7: '木牛流马',
			muniu_skill_bg: '辎',
			muniu_info: '①出牌阶段限一次，你可以将一张手牌扣置于你装备区里的【木牛流马】下，然后你可以将【木牛流马】移动到一名其他角色的装备区里。②你可以将【木牛流马】下的牌如手牌般使用或打出。③当你失去装备区的【木牛流马】后，你刷新〖木牛流马①〗的使用次数限制。若此牌不是因置入其他角色的装备区而失去的，则你将【木牛流马】下的所有牌置入弃牌堆。',
			muniu_skill_info: '将一张手牌扣置于你装备区里的【木牛流马】下，然后可以将此装备移动到一名其他角色的装备区里。',

			//delayCard
			_yanchi: "延迟",
			_yanchi_info: "出牌阶段，你可将一张拥有“赠”标签的手牌区装备牌置于一名其他角色的装备区内，或将一张拥有“赠”标签的手牌区非装备牌正面朝上交给一名其他角色。",
			"guohe_delay": "过河拆桥",
			"guohe_delay_info": "出牌阶段对其他角色使用，将该牌置入其判定区内。若判定结果大于3，你可以依次弃置其每个区域里的一张牌。",
			"shunshou_delay": "顺手牵羊",
			"shunshou_delay_info": "出牌阶段对其他角色使用，将该牌置入其判定区内。若判定结果小于J，你可以将其区域里的一张牌置入另一名角色区域相应位置。",
			"manzu_delay": "延迟满足",
			'manzu_delay_bg': '满',
			"manzu_delay_info": "出牌阶段对一名角色使用，将该牌置入其判定区内。若判定结果不为黑桃，其选择一项：1.摸四张牌，然后弃置两张牌；2.摸三张牌，至少交给其他角色一张牌。",
			"guagu_delay": "刮骨疗毒",
			"guagu_delay_info": "出牌阶段对一名角色使用，将该牌置入其判定区内。其处于濒死状态或在判定阶段受伤时，任何判定结果均生效，其回复1点体力，然后弃置所有的毒（防止【毒】的体力流失）。若判定结果为红色，其摸一张牌。",
			"sha_delay": "杀",
			"huosha_delay": '火杀',
			"leisha_delay": '雷杀',
			"icesha_delay": '冰杀',
			"cisha_delay": '刺杀',
			"sha_delay_info": "出牌阶段对你攻击范围内的一名角色使用，将该牌置入其判定区内。若判定结果与该牌花色不同，你对目标使用此【杀】并发动额外效果。",
			"tao_delay": "桃",
			"tao_delay_info": "出牌阶段对一名角色使用，将该牌置入其判定区内。其处于濒死状态或在判定阶段受伤时，任何判定结果均生效，其回复1点体力。若判定结果为红色，其摸一张牌。",
			"jiu_delay": "酒",
			"jiu_delay_info": "出牌阶段对一名角色使用，将该牌置入其判定区内。其处于濒死状态或在判定阶段时，若判定结果不为梅花，其回复1点体力并对自己使用此【酒】。",
			"huogong_delay": "火攻",
			"huogong_delay_info": "出牌阶段对一名角色使用，将该牌置入其判定区内。其弃置一张与判定牌花色相同的牌，否则受到1点火焰伤害。",
			"caiming_delay": "猜名",
			"caiming_delay_info": "出牌阶段对一名角色使用，将该牌置入其判定区内。其选择若干首歌，如果其字数之和：小于判定牌点数，受到1点雷电伤害；大于13，受到2点雷电伤害。",
			'pengran_delay': '怦然心动',
			'pengran_delay_info': '出牌阶段对一名其他角色使用，将该牌置入其判定区内。其弃置一张大于判定牌点数的牌，否则受到1点自适应伤害。',

			'xiayu_delay_skill': '下雨',
			'zhifang_delay_skill': '纸防',
			'fengqing_delay_skill': '风情',
			'luanchuang_delay_skill': '乱创',
			delay_luanchuang_tag: '延·乱创',
			delay_fengqing_tag: '延·风情',
			delay_xiayu_tag: '延·下雨',
			delay_zhifang_tag: '延·纸防',
			delay_jiabu_tag: '延·嘉步',
			delay_tag: '延时',

			//new Card for A-SOUL
			"huizhe": "会者不难",
			"huizhe_info": "出牌阶段，令场上一张半延时牌的立即生效。或在场上一张延时牌的延时效果即将生效时，抵消之。",
			"menghun": "萌混过关",
			"menghun_info": "可怜的嘉然小姐在贝拉队长的铁拳下再也没办法萌混过关了。",
			"menghun_append": '<span class="text" style="font-family: fulu">【萌混过关】于4月29日被移出游戏。</span',
			"shebei": "设备检修",
			"shebei_info": "出牌阶段，对一名角色使用，重铸其区域内的一张牌。",
			"tuqiong": "图穷匕见",
			"tuqiong_info": "出牌阶段，对一名其他角色使用。你与该角色摸一张牌，将【图穷匕见】放置于其判定区中，若判定结果不为黑桃，其受到1点伤害。",
			'tuqiong_bg': '图',
			"tufa": "突发恶疾",
			"tufa_info": "出牌阶段，对场上所有角色使用。分别横置或重置这些角色，然后对自己造成1点无来源的火焰伤害。",
			"mingan": "超级敏感",
			"mingan_info": "出牌阶段，对场上其他所有角色使用。从牌堆亮出一张牌，目标角色依次打出一张与上一张牌花色/类别/点数相同的牌，否则该角色受到1点伤害。",
			"wudou": "舞斗",
			"wudou_info": "出牌阶段，对一名其他角色使用。由你开始，你与目标角色依次使用一张牌、结算后摸一张牌，直至一方受到伤害为止。先不使用牌的一方受到对方造成的1点伤害。舞斗过程中，双方使用牌只能指定对方为唯一目标。",
			"wudou1": "孤勇",
			"wudou1_info": "你与舞斗的另一方使用牌没有距离和次数限制。",
			'wudou1_append': '<span class="text" style="font-family: fulu"><span class=thundertext>谁说冠军就不能来自虚空。</span>',
			"wudou2": "观众",
			"wudou2_info": "舞斗会上的双方使用牌无法指定你们为目标，可以坐下来观赛了。",
			"caiming": "猜名",
			"caiming_info": "出牌阶段，对一名距离为1的其他角色使用。你从曲库中选择一首歌，令其猜测歌名的字数；若猜错，你对其造成1点雷电伤害。",
			"Gsusu": '溯',
			"Gsusu_info": '<span style="color:#E799B0">溯</span>',
			"Gmangzhong": '芒种',
			"Gmangzhong_info": '<span style="color:#576690">芒种</span>',
			"Gdaben": '大笨钟',
			"Gdaben_info": '<span style="color:#9AC8E2">大笨钟</span>',
			"Gyunyan": '云烟成雨',
			"Gyunyan_info": '<span style="color:#B8A6D9">云烟成雨</span>',
			"Ghongse": '红色高跟鞋',
			"Ghongse_info": '<span style="color:#DB7D74">红色高跟鞋</span>',
			"shuimu": "水母之歌",
			"shuimu_info": "出牌阶段，对自己使用。将【水母之歌】放置在判定区中，若判定结果不为方片，你选择一项：1.摸一张牌2.卜算三张牌，然后将之重新置入你的判定区。",
			'shuimu_bg': '水',
			'pengran': '怦然心动',
			'pengran_info': '出牌阶段，对一名其他角色使用。你与该角色进行拼点：若你赢，你获得双方的拼点牌。',
			'pengran_append': '<span class="text" style="font-family: fulu">私自怜兮何极，心怦怦兮谅直。</span>',
			//text for new equip
			"Atiegun": "铁棍",
			"Atiegun_info": "当你的【杀】生效时，你可以弃置一张手牌，根据其花色获得对应额外效果。红桃：获得“嘉步”；方片：获得“下雨”；梅花：获得“风情”；黑桃：获得“纸防”。",
			'Atiegun_append': '<span class="text" style="font-family: fulu"><span style="color:#DB7D74">铁棍不仅是枝江权力的象征，更是奴役队友的工具。</span>',
			"Atiegun_skill": "铁棍",
			"Ashanzi": "隔岸扇",
			//		"Ashanzi_info": "锁定技。你使用不同花色的【杀】时无次数限制。",
			'Ashanzi_info': '锁定技，使用杀指定目标时，若其：已横置，此【杀】改为【雷杀】；未横置，将其横置。',
			'Ashanzi_append': '<span class="text" style="font-family: fulu"><span style="color:#B8A6D9">你滴狼王，无限猖狂！</span>',
			"Ashanzi_skill": "隔岸扇",
			"Ashoubing": "精英手柄",
			"Ashoubing_info": "锁定技，当你使用【杀】时，改为从牌堆顶亮出三张牌，你选择一张使用。",
			'Ashoubing_append': '<span class="text" style="font-family: fulu"><span style="color:#9AC8E2">记得算一算自己的kda哦。</span>',
			"Ashoubing_skill": "精英手柄",
			"Ahuasan": "花伞",
			"Ahuasan_info": "锁定技，锦囊牌造成的伤害对你无效。",
			'Ahuasan_append': '<span class="text" style="font-family: fulu"><span style="color:#DB7D74">Hey,Lin,愿你生如夏花般灿烂。</span>',
			"Ahuasan_skill": "花伞",
			"Abinggan": "小熊饼干罐",
			"Abinggan_info": "出牌阶段限一次，你可以将一张红桃牌视为【桃】对自己延迟使用。当失去装备区里的【小熊饼干罐】后，弃置你判定区中的【桃】。",
			'Abinggan_append': '<span class="text" style="font-family: fulu"><span style="color:#E799B0">你明儿再想吃我的东西，可不能了！</span>',
			"Abinggan_skill": "小熊饼干罐",
			"Amanniu": "蛮牛",
			"Amanniu_info": "锁定技，出牌阶段，若你没有出过【杀】，你的红色牌视为【杀】。",
			'Amanniu_append': '<span class="text" style="font-family: fulu">勇敢牛牛，不怕困难。</span>',
			"Amanniu_skill": "蛮牛",
			'Amanniu_bg': '-马',
			"Ayangtuo": "羊驼",
			"Ayangtuo_info": "锁定技，当延时牌进入你的判定区时，将其弃置。",
			'Ayangtuo_append': '<span class="text" style="font-family: fulu">对不起小伙伴。</span>',
			"Ayangtuo_skill": "羊驼",
			'Ayangtuo_bg': '+马',
			"Azhijiangstar": "枝江之心",
			//		"Azhijiangstar_info": "回合开始和结束时，你选择一项：1.将任意张手牌置于牌堆顶2.将此装备牌移动到一名其他角色的装备区里，然后你摸一张牌。",
			"Azhijiangstar_info": '当【枝江之心】进入你的装备区时，你须将其它一张牌置于牌堆顶。当你失去装备区内的【枝江之心】时，将手牌补至体力上限（至多补至五张）。',
			'Azhijiangstar_append': '<span class="text" style="font-family: xiaozhuan"><span style="color:#FC966E">山有木兮木有枝<br>心悦君兮君不知</span>',
			"Azhijiangstar_skill": "枝江之心",
			'Azhijiangstar_bg': '心',
			"Ajiutong": "酒桶",
			"Ajiutong_info": "出牌阶段限一次，你可以将一张黑桃牌视为【酒】对自己延迟使用。当失去装备区里的【酒桶】后，弃置你判定区中的【酒】。",
			'Ajiutong_append': '<span class="text" style="font-family: fulu">你买单，我就来！</span>',
			"Ajiutong_skill": "酒桶",
		},
		list: [
			['spade', 1, 'guding'],
			['spade', 2, 'Ajiutong'],
			['spade', 3, 'jiu'],
			['spade', 4, 'sha', 'thunder'],
			['spade', 5, 'sha', 'thunder'],
			['spade', 6, 'sha', 'thunder'],
			['spade', 7, 'sha', 'thunder'],
			['spade', 8, 'sha', 'thunder', ['delay_zhifang']],
			['spade', 9, 'jiu', null, ['delay']],
			['spade', 10, 'bingliang'],
			['spade', 11, 'tiesuo'],
			['spade', 12, 'tiesuo'],
			['spade', 13, 'wuxie'],
			['heart', 1, 'wuxie'],
			['heart', 2, 'huogong'],
			['heart', 3, 'huogong'],
			['heart', 4, 'sha', "fire"],
			['heart', 5, 'tao'],
			['heart', 6, 'tao'],
			['heart', 7, 'sha', "fire"],
			['heart', 8, 'shan'],
			['heart', 9, 'shan'],
			['heart', 10, 'sha', "fire", ['delay_fengqing']],
			['heart', 11, 'shan'],
			["heart", 12, 'shan'],
			["heart", 13, 'wuxie'],
			["club", 1, 'baiyin'],
			["club", 2, 'tengjia', null, ['gifts']],
			["club", 3, 'jiu'],
			["club", 4, 'bingliang'],
			["club", 5, 'sha', 'thunder'],
			["club", 6, 'sha', 'thunder'],
			['club', 7, 'sha', "thunder", ['delay_fengqing']],
			['club', 8, 'sha', "thunder", ['delay_fengqing']],
			['club', 9, 'jiu'],
			['club', 10, 'jiu'],
			['club', 11, 'huizhe'],
			['club', 12, 'tiesuo'],
			['club', 13, 'tiesuo'],
			['diamond', 1, 'zhuque'],
			['diamond', 2, 'tao'],
			['diamond', 3, 'tao'],
			['diamond', 4, 'sha', "fire"],
			['diamond', 5, 'sha', "fire"],
			['diamond', 6, 'shan'],
			['diamond', 7, 'shan'],
			['diamond', 8, 'shan'],
			['diamond', 9, 'jiu', null, ['delay']],
			['diamond', 10, 'shan'],
			['diamond', 11, 'shan'],
			['diamond', 12, 'huogong', null, ['delay']],
			["diamond", 13, 'hualiu'],

			['spade', 1, 'shandian'],
			['spade', 2, 'cixiong'],
			['spade', 3, 'guohe'],
			['spade', 4, 'guohe'],
			['spade', 5, 'sha'],
			['spade', 6, 'lebu'],
			['spade', 7, 'mingan'],
			['spade', 8, 'sha'],
			['spade', 9, 'sha'],
			['spade', 10, 'sha', null, ['delay']],
			['spade', 11, 'shunshou'],
			['spade', 12, 'zhangba'],
			['spade', 13, 'dawan'],
			['heart', 1, 'wanjian'],
			['heart', 2, 'shan'],
			['heart', 3, 'wugu'],
			['heart', 4, 'tao'],
			['heart', 5, 'chitu'],
			['heart', 6, 'lebu'],
			['heart', 7, 'tao'],
			['heart', 8, 'manzu', null, ['delay']],
			['heart', 9, 'tao'],
			['heart', 10, 'sha', null, ['delay_zhifang']],
			['heart', 11, 'manzu', null, ['delay']],
			["heart", 12, 'guohe', null, ['delay']],
			["heart", 13, 'zhuahuang'],
			["club", 1, 'zhuge'],
			["club", 2, 'bagua'],
			["club", 3, 'sha', null, ['delay_luanchuang']],
			["club", 4, 'sha', null, ['delay_luanchuang']],
			["club", 5, 'dilu'],
			["club", 6, 'sha'],
			['club', 7, 'nanman'],
			['club', 8, 'sha'],
			['club', 9, 'sha'],
			['club', 10, 'sha'],
			['club', 11, 'sha'],
			['club', 12, 'wuxie'],
			['club', 13, 'jiedao'],
			['diamond', 1, 'juedou'],
			['diamond', 2, 'shan'],
			['diamond', 3, 'shan'],
			['diamond', 4, 'shunshou', null, ['delay']],
			['diamond', 5, 'guanshi'],
			['diamond', 6, 'sha'],
			['diamond', 7, 'shan'],
			['diamond', 8, 'shan'],
			['diamond', 9, 'shan'],
			['diamond', 10, 'sha'],
			['diamond', 11, 'shan'],
			['diamond', 12, 'tao', null, ['delay']],
			["diamond", 13, 'sha', null, ['delay_jiabu']],

			['spade', 1, 'guaguliaodu', null, ['delay']],
			['spade', 2, 'qixingbaodao', null, ['gifts']],
			['spade', 3, 'shunshou', null, ['gifts']],
			['spade', 4, 'du', null, ['gifts']],
			['spade', 5, 'du', null, ['gifts']],
			['spade', 6, 'sha', null, ['delay_xiayu']],
			['spade', 7, 'sha', null, ['delay_xiayu']],
			['spade', 8, 'sha', 'stab', ['delay_xiayu']],
			['spade', 9, 'du', null, ['gifts']],
			['spade', 10, 'du', null, ['gifts']],
			['spade', 11, 'wuxie'],
			['spade', 12, 'chenghuodajie'],
			['spade', 13, 'chenghuodajie'],
			['heart', 1, 'guaguliaodu', null, ['delay']],
			['heart', 2, 'shan', null, ['gifts']],
			['heart', 3, 'wugu', null, ['gifts']],
			['heart', 4, 'xinge', null, ['gifts']],
			['heart', 5, 'sha', null, ['gifts']],
			['heart', 6, 'pengran', null, ['delay']],
			['heart', 7, 'tao'],
			['heart', 8, 'tao'],
			['heart', 9, 'serafuku', null, ['gifts']],
			['heart', 10, 'sha', null, ['gifts']],
			['heart', 11, 'sha', null, ['gifts']],
			["heart", 12, 'sha', null, ['gifts']],
			["heart", 13, 'zhanxiang', null, ['gifts']],
			["club", 1, 'duanjian', null, ['gifts']],
			["club", 2, 'sha', 'stab'],
			["club", 3, 'yinfengyi', null, ['gifts']],
			["club", 4, 'du'],
			["club", 5, 'yitianjian'],
			["club", 6, 'du'],
			['club', 7, 'sha', 'stab'],
			['club', 8, 'sha', 'stab'],
			['club', 9, 'sha', 'stab'],
			['club', 10, 'sha', 'stab'],
			['club', 11, 'wuxie'],
			['club', 12, 'wuxie'],
			['club', 13, 'yonglv', null, ['gifts']],
			['diamond', 1, 'juedou', null, ['gifts']],
			['diamond', 2, 'shan', null, ['gifts']],
			['diamond', 3, 'shebei', null, ['gifts']],
			['diamond', 4, 'shebei', null, ['gifts']],
			['diamond', 5, 'shan'],
			['diamond', 6, 'shan'],
			['diamond', 7, 'shan'],
			['diamond', 8, 'shan'],
			['diamond', 9, 'tuixinzhifu'],
			['diamond', 10, 'tuixinzhifu'],
			['diamond', 11, 'tao', null, ['gifts']],
			['diamond', 12, 'shan'],
			["diamond", 13, 'sha', 'stab', ['delay_jiabu']],

			['spade', 1, 'mingan'],
			['spade', 2, 'sha'],
			['spade', 3, 'sha'],
			['spade', 4, 'sha'],
			['spade', 5, 'Atiegun'],
			['spade', 6, 'huizhe'],
			['spade', 7, 'tuqiong'],
			['spade', 8, 'pengran'],
			['spade', 9, 'sha', 'stab', ['delay_zhifang']],
			['spade', 10, 'caiming', null, ['gifts']],
			['spade', 11, 'guohe', null, ['delay']],
			['spade', 12, 'wuxie', null, ['gifts']],
			['spade', 13, 'Amanniu', null, ['gifts']],
			['heart', 1, 'tufa', null, ['gifts']],
			['heart', 2, 'shuimu'],
			['heart', 3, 'shan'],
			['heart', 4, 'sha', "fire"],
			['heart', 5, 'sha', "fire"],
			['heart', 6, 'shan'],
			['heart', 7, 'shan'],
			['heart', 8, 'Ashanzi'],
			['heart', 9, 'wudou'],
			['heart', 10, 'tao', "star"],
			['heart', 11, 'tao', "star"],
			["heart", 12, 'manzu', null, ['delay']],
			["heart", 13, 'Azhijiangstar', null, ['gifts']],
			["club", 1, 'Ahuasan'],
			["club", 2, 'shebei'],
			["club", 3, 'shebei'],
			["club", 4, 'Ashoubing', null, ['gifts']],
			["club", 5, 'sha', null, ['delay_luanchuang']],
			["club", 6, 'huizhe'],
			['club', 7, 'caiming'],
			['club', 8, 'pengran', null, ['delay']],
			['club', 9, 'sha', "thunder"],
			['club', 10, 'sha', "thunder"],
			['club', 11, 'shunshou', null, ['delay']],
			['club', 12, 'tuqiong'],
			['club', 13, 'Ayangtuo', null, ['gifts']],
			['diamond', 1, 'huogong', null, ['delay']],
			['diamond', 2, 'sha'],
			['diamond', 3, 'Abinggan'],
			['diamond', 4, 'shan'],
			['diamond', 5, 'shan'],
			['diamond', 6, 'tao', 'star', ['gifts']],
			['diamond', 7, 'sha', 'fire', ['delay_jiabu']],
			['diamond', 8, 'shan'],
			['diamond', 9, 'shan'],
			['diamond', 10, 'tao', null, ['delay']],
			['diamond', 11, 'shuimu'],
			['diamond', 12, 'wuxie'],
			["diamond", 13, 'wudou'],

			['spade', 1, 'juedou'],
			['heart', 1, 'taoyuan'],
			['club', 13, 'wuxie'],
			["diamond", 13, 'wuxie'],
		],
	};
});
